<!-- HTML header for doxygen 1.8.20-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
	<meta http-equiv="X-UA-Compatible" content="IE=9"/>
	<meta name="generator" content="Doxygen 1.9.4"/>
	<meta name="viewport" content="width=device-width, initial-scale=1"/>
	<title>Raspberry Pi Pico SDK: hardware_pio</title>
	<!-- <link href="tabs.css" rel="stylesheet" type="text/css"/> -->
	<script type="text/javascript" src="jquery.js"></script>
	<script type="text/javascript" src="dynsections.js"></script>
	<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
	<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
    <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500&display=swap" rel="stylesheet">
	<link href="doxygen.css" rel="stylesheet" type="text/css" />
	<link href="normalise.css" rel="stylesheet" type="text/css"/>
<link href="main.css" rel="stylesheet" type="text/css"/>
<link href="styles.css" rel="stylesheet" type="text/css"/>
</head>
<body>
	<div class="navigation-mobile">
		<div class="logo--mobile">
			<a href="/"><img src="logo-mobile.svg" alt="Raspberry Pi"></a>
		</div>
		<div class="navigation-toggle">
			<span class="line-1"></span>
			<span class="line-2">
				<p>Menu Toggle</p>
			</span>
			<span class="line-3"></span>
		</div>
	</div>
	<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
		<div class="logo">
			<a href="index.html"> <img src="logo.svg" alt="Raspberry Pi"></a>
			<span style="display: inline-block; margin-top: 10px;">
				v2.0.0
			</span>
		</div>
		<div class="navigation-footer">
			<img src="logo-mobile.svg" alt="Raspberry Pi">
			<a href="https://www.raspberrypi.com/" target="_blank">By Raspberry Pi Ltd</a>
		</div>
<!-- 		<div class="search">
			<form>
				<input type="search" name="search" id="search" placeholder="Search">
				<input type="submit" value="Search">
			</form>
		</div> -->
<!-- Generated by Doxygen 1.9.4 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('group__hardware__pio.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#groups">Modules</a> &#124;
<a href="#define-members">Macros</a> &#124;
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#enum-members">Enumerations</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle"><div class="title">hardware_pio<div class="ingroups"><a class="el" href="group__hardware.html">Hardware APIs</a></div></div></div>
</div><!--header-->
<div class="contents">

<p>Programmable I/O (PIO) API.  
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="groups" name="groups"></a>
Modules</h2></td></tr>
<tr class="memitem:group__sm__config"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sm__config.html">sm_config</a></td></tr>
<tr class="memdesc:group__sm__config"><td class="mdescLeft">&#160;</td><td class="mdescRight">PIO state machine configuration. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:group__pio__instructions"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__pio__instructions.html">pio_instructions</a></td></tr>
<tr class="memdesc:group__pio__instructions"><td class="mdescLeft">&#160;</td><td class="mdescRight">PIO instruction encoding. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="define-members" name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:ga916d05e71da7f2173cd22b46bbfa0a11"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__pio.html#ga916d05e71da7f2173cd22b46bbfa0a11">pio0</a>&#160;&#160;&#160;pio0_hw</td></tr>
<tr class="separator:ga916d05e71da7f2173cd22b46bbfa0a11"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga923a261ba19804c404900228e99c9522"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__pio.html#ga923a261ba19804c404900228e99c9522">pio1</a>&#160;&#160;&#160;pio1_hw</td></tr>
<tr class="separator:ga923a261ba19804c404900228e99c9522"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga79fcbff988c01df8285f05ce6ad3a86d"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__pio.html#ga79fcbff988c01df8285f05ce6ad3a86d">PIO_NUM</a>(pio)</td></tr>
<tr class="memdesc:ga79fcbff988c01df8285f05ce6ad3a86d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the PIO number for a PIO instance.  <a href="group__hardware__pio.html#ga79fcbff988c01df8285f05ce6ad3a86d">More...</a><br /></td></tr>
<tr class="separator:ga79fcbff988c01df8285f05ce6ad3a86d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga06134c14db82b7927d96faeb07ab0e8b"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__pio.html#ga06134c14db82b7927d96faeb07ab0e8b">PIO_INSTANCE</a>(instance)</td></tr>
<tr class="memdesc:ga06134c14db82b7927d96faeb07ab0e8b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the PIO instance with the given PIO number.  <a href="group__hardware__pio.html#ga06134c14db82b7927d96faeb07ab0e8b">More...</a><br /></td></tr>
<tr class="separator:ga06134c14db82b7927d96faeb07ab0e8b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa26de7b3ef34fb86138bf376ab152577"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__pio.html#gaa26de7b3ef34fb86138bf376ab152577">PIO_FUNCSEL_NUM</a>(pio,  gpio)</td></tr>
<tr class="memdesc:gaa26de7b3ef34fb86138bf376ab152577"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns <a class="el" href="group__hardware__gpio.html#ga89b8e5e8a9c515260dea8d1fa96e72c9">gpio_function_t</a> needed to select the PIO function for the given PIO instance on the given GPIO.  <a href="group__hardware__pio.html#gaa26de7b3ef34fb86138bf376ab152577">More...</a><br /></td></tr>
<tr class="separator:gaa26de7b3ef34fb86138bf376ab152577"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab9eca729acb2cebdb1abb7793d0f5bdf"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__pio.html#gab9eca729acb2cebdb1abb7793d0f5bdf">PIO_DREQ_NUM</a>(pio,  sm,  is_tx)</td></tr>
<tr class="memdesc:gab9eca729acb2cebdb1abb7793d0f5bdf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the <a class="el" href="group__hardware__dma.html#ga8def0ea481095c94f3a0dd0b4fed999e">dreq_num_t</a> used for pacing DMA transfers to or from a given state machine's FIFOs on this PIO instance. If is_tx is true, then it is for transfers to the PIO state machine TX FIFO else for transfers from the PIO state machine RX FIFO.  <a href="group__hardware__pio.html#gab9eca729acb2cebdb1abb7793d0f5bdf">More...</a><br /></td></tr>
<tr class="separator:gab9eca729acb2cebdb1abb7793d0f5bdf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaeb939c4541517980acf9de3ae4010624"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__pio.html#gaeb939c4541517980acf9de3ae4010624">PIO_IRQ_NUM</a>(pio,  irqn)</td></tr>
<tr class="memdesc:gaeb939c4541517980acf9de3ae4010624"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the <a class="el" href="group__hardware__irq.html#gaf30862f51b5994ffd5863176a185d137">irq_num_t</a> for processor interrupts from the given PIO instance.  <a href="group__hardware__pio.html#gaeb939c4541517980acf9de3ae4010624">More...</a><br /></td></tr>
<tr class="separator:gaeb939c4541517980acf9de3ae4010624"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="typedef-members" name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:gab9e9aed4bb165a040415ae342e0902fe"><td class="memItemLeft" align="right" valign="top"><a id="gab9e9aed4bb165a040415ae342e0902fe" name="gab9e9aed4bb165a040415ae342e0902fe"></a>
typedef enum <a class="el" href="group__hardware__pio.html#ga0e60c768ea29f296b5ef40c02211bbcc">pio_interrupt_source</a>&#160;</td><td class="memItemRight" valign="bottom"><b>pio_interrupt_source_t</b></td></tr>
<tr class="memdesc:gab9e9aed4bb165a040415ae342e0902fe"><td class="mdescLeft">&#160;</td><td class="mdescRight">PIO interrupt source numbers for pio related IRQs. <br /></td></tr>
<tr class="separator:gab9e9aed4bb165a040415ae342e0902fe"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="enum-members" name="enum-members"></a>
Enumerations</h2></td></tr>
<tr class="memitem:ga7d415b966abbc1c25315d0775d093356"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__pio.html#ga7d415b966abbc1c25315d0775d093356">pio_fifo_join</a> { <a class="el" href="group__hardware__pio.html#gga7d415b966abbc1c25315d0775d093356a1ecaeaf5a3d81338a276b30f019b05c4">PIO_FIFO_JOIN_NONE</a> = 0
, <a class="el" href="group__hardware__pio.html#gga7d415b966abbc1c25315d0775d093356a22a2cbf467019804e134a38d40249f50">PIO_FIFO_JOIN_TX</a> = 1
, <a class="el" href="group__hardware__pio.html#gga7d415b966abbc1c25315d0775d093356ab2cff7409baac4928fec469fe5b44ed0">PIO_FIFO_JOIN_RX</a> = 2
 }</td></tr>
<tr class="memdesc:ga7d415b966abbc1c25315d0775d093356"><td class="mdescLeft">&#160;</td><td class="mdescRight">FIFO join states.  <a href="group__hardware__pio.html#ga7d415b966abbc1c25315d0775d093356">More...</a><br /></td></tr>
<tr class="separator:ga7d415b966abbc1c25315d0775d093356"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga356b3f4974cd31fdc4a2de381aceea5e"><td class="memItemLeft" align="right" valign="top"><a id="ga356b3f4974cd31fdc4a2de381aceea5e" name="ga356b3f4974cd31fdc4a2de381aceea5e"></a>enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__pio.html#ga356b3f4974cd31fdc4a2de381aceea5e">pio_mov_status_type</a> { <b>STATUS_TX_LESSTHAN</b> = 0
, <b>STATUS_RX_LESSTHAN</b> = 1
 }</td></tr>
<tr class="memdesc:ga356b3f4974cd31fdc4a2de381aceea5e"><td class="mdescLeft">&#160;</td><td class="mdescRight">MOV status types. <br /></td></tr>
<tr class="separator:ga356b3f4974cd31fdc4a2de381aceea5e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga0e60c768ea29f296b5ef40c02211bbcc"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__pio.html#ga0e60c768ea29f296b5ef40c02211bbcc">pio_interrupt_source</a> { <br />
&#160;&#160;<a class="el" href="group__hardware__pio.html#gga0e60c768ea29f296b5ef40c02211bbcca23610bee821f3f8fecbfad0e48c6d742">pis_interrupt0</a> = PIO_INTR_SM0_LSB
, <a class="el" href="group__hardware__pio.html#gga0e60c768ea29f296b5ef40c02211bbcca6cd394d2b05ae5eec188d5283d16dc49">pis_interrupt1</a> = PIO_INTR_SM1_LSB
, <a class="el" href="group__hardware__pio.html#gga0e60c768ea29f296b5ef40c02211bbcca066e1cafa42ed6638c93cc09c9b1a0d4">pis_interrupt2</a> = PIO_INTR_SM2_LSB
, <a class="el" href="group__hardware__pio.html#gga0e60c768ea29f296b5ef40c02211bbcca94cf23106019a84873d6db52d1e8470f">pis_interrupt3</a> = PIO_INTR_SM3_LSB
, <br />
&#160;&#160;<a class="el" href="group__hardware__pio.html#gga0e60c768ea29f296b5ef40c02211bbcca924b2a1d4b6d257ac13608729dcf9ee1">pis_sm0_tx_fifo_not_full</a> = PIO_INTR_SM0_TXNFULL_LSB
, <a class="el" href="group__hardware__pio.html#gga0e60c768ea29f296b5ef40c02211bbcca27452b43a8d5d40ab0ba25a195681d48">pis_sm1_tx_fifo_not_full</a> = PIO_INTR_SM1_TXNFULL_LSB
, <a class="el" href="group__hardware__pio.html#gga0e60c768ea29f296b5ef40c02211bbcca214d3bdb6ebc516c4094c4eb476d514d">pis_sm2_tx_fifo_not_full</a> = PIO_INTR_SM2_TXNFULL_LSB
, <a class="el" href="group__hardware__pio.html#gga0e60c768ea29f296b5ef40c02211bbcca463c09bec3151921a18be2c548e97297">pis_sm3_tx_fifo_not_full</a> = PIO_INTR_SM3_TXNFULL_LSB
, <br />
&#160;&#160;<a class="el" href="group__hardware__pio.html#gga0e60c768ea29f296b5ef40c02211bbcca959e0b9e484719a0af543fb87a365d52">pis_sm0_rx_fifo_not_empty</a> = PIO_INTR_SM0_RXNEMPTY_LSB
, <a class="el" href="group__hardware__pio.html#gga0e60c768ea29f296b5ef40c02211bbcca85ee2774a8e5dfaf61d3866a81cb381c">pis_sm1_rx_fifo_not_empty</a> = PIO_INTR_SM1_RXNEMPTY_LSB
, <a class="el" href="group__hardware__pio.html#gga0e60c768ea29f296b5ef40c02211bbcca6d7f4a904cb634fd3f30f033874393ac">pis_sm2_rx_fifo_not_empty</a> = PIO_INTR_SM2_RXNEMPTY_LSB
, <a class="el" href="group__hardware__pio.html#gga0e60c768ea29f296b5ef40c02211bbccaacce0dbc391b9bb05965b7bc1b6f7698">pis_sm3_rx_fifo_not_empty</a> = PIO_INTR_SM3_RXNEMPTY_LSB
<br />
 }</td></tr>
<tr class="memdesc:ga0e60c768ea29f296b5ef40c02211bbcc"><td class="mdescLeft">&#160;</td><td class="mdescRight">PIO interrupt source numbers for pio related IRQs.  <a href="group__hardware__pio.html#ga0e60c768ea29f296b5ef40c02211bbcc">More...</a><br /></td></tr>
<tr class="separator:ga0e60c768ea29f296b5ef40c02211bbcc"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga89688fd1a941797cb0cc80dbbc4bbd5f"><td class="memItemLeft" align="right" valign="top">static uint&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__pio.html#ga89688fd1a941797cb0cc80dbbc4bbd5f">pio_get_gpio_base</a> (<a class="el" href="structpio__hw__t.html">PIO</a> pio)</td></tr>
<tr class="memdesc:ga89688fd1a941797cb0cc80dbbc4bbd5f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the base GPIO base for the PIO instance.  <a href="group__hardware__pio.html#ga89688fd1a941797cb0cc80dbbc4bbd5f">More...</a><br /></td></tr>
<tr class="separator:ga89688fd1a941797cb0cc80dbbc4bbd5f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga28e9a84f3332ebf088f665d4b676117b"><td class="memItemLeft" align="right" valign="top">static int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__pio.html#ga28e9a84f3332ebf088f665d4b676117b">pio_sm_set_config</a> (<a class="el" href="structpio__hw__t.html">PIO</a> pio, uint sm, const <a class="el" href="structpio__sm__config.html">pio_sm_config</a> *config)</td></tr>
<tr class="memdesc:ga28e9a84f3332ebf088f665d4b676117b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Apply a state machine configuration to a state machine.  <a href="group__hardware__pio.html#ga28e9a84f3332ebf088f665d4b676117b">More...</a><br /></td></tr>
<tr class="separator:ga28e9a84f3332ebf088f665d4b676117b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae86f691914b78d66b1394ae94f3f4aa6"><td class="memItemLeft" align="right" valign="top">static uint&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__pio.html#gae86f691914b78d66b1394ae94f3f4aa6">pio_get_index</a> (<a class="el" href="structpio__hw__t.html">PIO</a> pio)</td></tr>
<tr class="memdesc:gae86f691914b78d66b1394ae94f3f4aa6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the instance number of a PIO instance.  <a href="group__hardware__pio.html#gae86f691914b78d66b1394ae94f3f4aa6">More...</a><br /></td></tr>
<tr class="separator:gae86f691914b78d66b1394ae94f3f4aa6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga9e150bfd3d43565a01f38a37fa2884d4"><td class="memItemLeft" align="right" valign="top">static uint&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__pio.html#ga9e150bfd3d43565a01f38a37fa2884d4">pio_get_funcsel</a> (<a class="el" href="structpio__hw__t.html">PIO</a> pio)</td></tr>
<tr class="memdesc:ga9e150bfd3d43565a01f38a37fa2884d4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the funcsel number of a PIO instance.  <a href="group__hardware__pio.html#ga9e150bfd3d43565a01f38a37fa2884d4">More...</a><br /></td></tr>
<tr class="separator:ga9e150bfd3d43565a01f38a37fa2884d4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga151f87205041da11d3c69be5ddbd5653"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="structpio__hw__t.html">PIO</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__pio.html#ga151f87205041da11d3c69be5ddbd5653">pio_get_instance</a> (uint instance)</td></tr>
<tr class="memdesc:ga151f87205041da11d3c69be5ddbd5653"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convert PIO instance to hardware instance.  <a href="group__hardware__pio.html#ga151f87205041da11d3c69be5ddbd5653">More...</a><br /></td></tr>
<tr class="separator:ga151f87205041da11d3c69be5ddbd5653"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gafa244b1be8f53a329db9d26298e054bb"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__pio.html#gafa244b1be8f53a329db9d26298e054bb">pio_gpio_init</a> (<a class="el" href="structpio__hw__t.html">PIO</a> pio, uint pin)</td></tr>
<tr class="memdesc:gafa244b1be8f53a329db9d26298e054bb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Setup the function select for a GPIO to use output from the given PIO instance.  <a href="group__hardware__pio.html#gafa244b1be8f53a329db9d26298e054bb">More...</a><br /></td></tr>
<tr class="separator:gafa244b1be8f53a329db9d26298e054bb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga4091eef7afda5200a3988b9412fe3b3f"><td class="memItemLeft" align="right" valign="top">static uint&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__pio.html#ga4091eef7afda5200a3988b9412fe3b3f">pio_get_dreq</a> (<a class="el" href="structpio__hw__t.html">PIO</a> pio, uint sm, bool is_tx)</td></tr>
<tr class="memdesc:ga4091eef7afda5200a3988b9412fe3b3f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the DREQ to use for pacing transfers to/from a particular state machine FIFO.  <a href="group__hardware__pio.html#ga4091eef7afda5200a3988b9412fe3b3f">More...</a><br /></td></tr>
<tr class="separator:ga4091eef7afda5200a3988b9412fe3b3f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga332210f0e594b24bf64f4bb1c8f49be3"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__pio.html#ga332210f0e594b24bf64f4bb1c8f49be3">pio_set_gpio_base</a> (<a class="el" href="structpio__hw__t.html">PIO</a> pio, uint gpio_base)</td></tr>
<tr class="memdesc:ga332210f0e594b24bf64f4bb1c8f49be3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the base GPIO base for the PIO instance.  <a href="group__hardware__pio.html#ga332210f0e594b24bf64f4bb1c8f49be3">More...</a><br /></td></tr>
<tr class="separator:ga332210f0e594b24bf64f4bb1c8f49be3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa8aafe966a46f4de9be59f73cae65a4b"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__pio.html#gaa8aafe966a46f4de9be59f73cae65a4b">pio_can_add_program</a> (<a class="el" href="structpio__hw__t.html">PIO</a> pio, const <a class="el" href="structpio__program.html">pio_program_t</a> *program)</td></tr>
<tr class="memdesc:gaa8aafe966a46f4de9be59f73cae65a4b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Determine whether the given program can (at the time of the call) be loaded onto the PIO instance.  <a href="group__hardware__pio.html#gaa8aafe966a46f4de9be59f73cae65a4b">More...</a><br /></td></tr>
<tr class="separator:gaa8aafe966a46f4de9be59f73cae65a4b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaafac789d94b0727bb02ea83a8786897f"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__pio.html#gaafac789d94b0727bb02ea83a8786897f">pio_can_add_program_at_offset</a> (<a class="el" href="structpio__hw__t.html">PIO</a> pio, const <a class="el" href="structpio__program.html">pio_program_t</a> *program, uint offset)</td></tr>
<tr class="memdesc:gaafac789d94b0727bb02ea83a8786897f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Determine whether the given program can (at the time of the call) be loaded onto the PIO instance starting at a particular location.  <a href="group__hardware__pio.html#gaafac789d94b0727bb02ea83a8786897f">More...</a><br /></td></tr>
<tr class="separator:gaafac789d94b0727bb02ea83a8786897f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaefbd086e8e96fee073438dac3c20334c"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__pio.html#gaefbd086e8e96fee073438dac3c20334c">pio_add_program</a> (<a class="el" href="structpio__hw__t.html">PIO</a> pio, const <a class="el" href="structpio__program.html">pio_program_t</a> *program)</td></tr>
<tr class="memdesc:gaefbd086e8e96fee073438dac3c20334c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Attempt to load the program.  <a href="group__hardware__pio.html#gaefbd086e8e96fee073438dac3c20334c">More...</a><br /></td></tr>
<tr class="separator:gaefbd086e8e96fee073438dac3c20334c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga12948478935f817218b64e1db3a8ebad"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__pio.html#ga12948478935f817218b64e1db3a8ebad">pio_add_program_at_offset</a> (<a class="el" href="structpio__hw__t.html">PIO</a> pio, const <a class="el" href="structpio__program.html">pio_program_t</a> *program, uint offset)</td></tr>
<tr class="memdesc:ga12948478935f817218b64e1db3a8ebad"><td class="mdescLeft">&#160;</td><td class="mdescRight">Attempt to load the program at the specified instruction memory offset.  <a href="group__hardware__pio.html#ga12948478935f817218b64e1db3a8ebad">More...</a><br /></td></tr>
<tr class="separator:ga12948478935f817218b64e1db3a8ebad"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga81c77d31aff72655977b658a9c37665e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__pio.html#ga81c77d31aff72655977b658a9c37665e">pio_remove_program</a> (<a class="el" href="structpio__hw__t.html">PIO</a> pio, const <a class="el" href="structpio__program.html">pio_program_t</a> *program, uint loaded_offset)</td></tr>
<tr class="memdesc:ga81c77d31aff72655977b658a9c37665e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Remove a program from a PIO instance's instruction memory.  <a href="group__hardware__pio.html#ga81c77d31aff72655977b658a9c37665e">More...</a><br /></td></tr>
<tr class="separator:ga81c77d31aff72655977b658a9c37665e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga850396a2a2925bbcc97247a629ca5bd2"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__pio.html#ga850396a2a2925bbcc97247a629ca5bd2">pio_clear_instruction_memory</a> (<a class="el" href="structpio__hw__t.html">PIO</a> pio)</td></tr>
<tr class="memdesc:ga850396a2a2925bbcc97247a629ca5bd2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Clears all of a PIO instance's instruction memory.  <a href="group__hardware__pio.html#ga850396a2a2925bbcc97247a629ca5bd2">More...</a><br /></td></tr>
<tr class="separator:ga850396a2a2925bbcc97247a629ca5bd2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa47ec4090dcdc251e44bf4e4cb89a7bc"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__pio.html#gaa47ec4090dcdc251e44bf4e4cb89a7bc">pio_sm_set_enabled</a> (<a class="el" href="structpio__hw__t.html">PIO</a> pio, uint sm, bool enabled)</td></tr>
<tr class="memdesc:gaa47ec4090dcdc251e44bf4e4cb89a7bc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enable or disable a PIO state machine.  <a href="group__hardware__pio.html#gaa47ec4090dcdc251e44bf4e4cb89a7bc">More...</a><br /></td></tr>
<tr class="separator:gaa47ec4090dcdc251e44bf4e4cb89a7bc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf726f77ee21f5373cadf064a4e0b4935"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__pio.html#gaf726f77ee21f5373cadf064a4e0b4935">pio_set_sm_mask_enabled</a> (<a class="el" href="structpio__hw__t.html">PIO</a> pio, uint32_t mask, bool enabled)</td></tr>
<tr class="memdesc:gaf726f77ee21f5373cadf064a4e0b4935"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enable or disable multiple PIO state machines.  <a href="group__hardware__pio.html#gaf726f77ee21f5373cadf064a4e0b4935">More...</a><br /></td></tr>
<tr class="separator:gaf726f77ee21f5373cadf064a4e0b4935"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga7b89b93dd0553c77538c70baf6a7e4f0"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__pio.html#ga7b89b93dd0553c77538c70baf6a7e4f0">pio_sm_restart</a> (<a class="el" href="structpio__hw__t.html">PIO</a> pio, uint sm)</td></tr>
<tr class="memdesc:ga7b89b93dd0553c77538c70baf6a7e4f0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Restart a state machine with a known state.  <a href="group__hardware__pio.html#ga7b89b93dd0553c77538c70baf6a7e4f0">More...</a><br /></td></tr>
<tr class="separator:ga7b89b93dd0553c77538c70baf6a7e4f0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae3e115fd41d9ac29c7a13b0c213bc2cd"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__pio.html#gae3e115fd41d9ac29c7a13b0c213bc2cd">pio_restart_sm_mask</a> (<a class="el" href="structpio__hw__t.html">PIO</a> pio, uint32_t mask)</td></tr>
<tr class="memdesc:gae3e115fd41d9ac29c7a13b0c213bc2cd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Restart multiple state machine with a known state.  <a href="group__hardware__pio.html#gae3e115fd41d9ac29c7a13b0c213bc2cd">More...</a><br /></td></tr>
<tr class="separator:gae3e115fd41d9ac29c7a13b0c213bc2cd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gacd981b2206b02eb1c4573a0f328d7819"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__pio.html#gacd981b2206b02eb1c4573a0f328d7819">pio_sm_clkdiv_restart</a> (<a class="el" href="structpio__hw__t.html">PIO</a> pio, uint sm)</td></tr>
<tr class="memdesc:gacd981b2206b02eb1c4573a0f328d7819"><td class="mdescLeft">&#160;</td><td class="mdescRight">Restart a state machine's clock divider from a phase of 0.  <a href="group__hardware__pio.html#gacd981b2206b02eb1c4573a0f328d7819">More...</a><br /></td></tr>
<tr class="separator:gacd981b2206b02eb1c4573a0f328d7819"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga63e13f639ae50ee9cb8afeceba6bb118"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__pio.html#ga63e13f639ae50ee9cb8afeceba6bb118">pio_clkdiv_restart_sm_mask</a> (<a class="el" href="structpio__hw__t.html">PIO</a> pio, uint32_t mask)</td></tr>
<tr class="memdesc:ga63e13f639ae50ee9cb8afeceba6bb118"><td class="mdescLeft">&#160;</td><td class="mdescRight">Restart multiple state machines' clock dividers from a phase of 0.  <a href="group__hardware__pio.html#ga63e13f639ae50ee9cb8afeceba6bb118">More...</a><br /></td></tr>
<tr class="separator:ga63e13f639ae50ee9cb8afeceba6bb118"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac3797a9f7e80606152eb44af9ca96398"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__pio.html#gac3797a9f7e80606152eb44af9ca96398">pio_enable_sm_mask_in_sync</a> (<a class="el" href="structpio__hw__t.html">PIO</a> pio, uint32_t mask)</td></tr>
<tr class="memdesc:gac3797a9f7e80606152eb44af9ca96398"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enable multiple PIO state machines synchronizing their clock dividers.  <a href="group__hardware__pio.html#gac3797a9f7e80606152eb44af9ca96398">More...</a><br /></td></tr>
<tr class="separator:gac3797a9f7e80606152eb44af9ca96398"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gafe39a664c508e08ef4c74b7c3c38bc07"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__pio.html#gafe39a664c508e08ef4c74b7c3c38bc07">pio_set_irq0_source_enabled</a> (<a class="el" href="structpio__hw__t.html">PIO</a> pio, <a class="el" href="group__hardware__pio.html#gab9e9aed4bb165a040415ae342e0902fe">pio_interrupt_source_t</a> source, bool enabled)</td></tr>
<tr class="memdesc:gafe39a664c508e08ef4c74b7c3c38bc07"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enable/Disable a single source on a PIO's IRQ 0.  <a href="group__hardware__pio.html#gafe39a664c508e08ef4c74b7c3c38bc07">More...</a><br /></td></tr>
<tr class="separator:gafe39a664c508e08ef4c74b7c3c38bc07"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga4369e665ee8d2db58a83eccad65c917c"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__pio.html#ga4369e665ee8d2db58a83eccad65c917c">pio_set_irq1_source_enabled</a> (<a class="el" href="structpio__hw__t.html">PIO</a> pio, <a class="el" href="group__hardware__pio.html#gab9e9aed4bb165a040415ae342e0902fe">pio_interrupt_source_t</a> source, bool enabled)</td></tr>
<tr class="memdesc:ga4369e665ee8d2db58a83eccad65c917c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enable/Disable a single source on a PIO's IRQ 1.  <a href="group__hardware__pio.html#ga4369e665ee8d2db58a83eccad65c917c">More...</a><br /></td></tr>
<tr class="separator:ga4369e665ee8d2db58a83eccad65c917c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga81259bc71fd3bd81b96e47f9f4ea7b67"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__pio.html#ga81259bc71fd3bd81b96e47f9f4ea7b67">pio_set_irq0_source_mask_enabled</a> (<a class="el" href="structpio__hw__t.html">PIO</a> pio, uint32_t source_mask, bool enabled)</td></tr>
<tr class="memdesc:ga81259bc71fd3bd81b96e47f9f4ea7b67"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enable/Disable multiple sources on a PIO's IRQ 0.  <a href="group__hardware__pio.html#ga81259bc71fd3bd81b96e47f9f4ea7b67">More...</a><br /></td></tr>
<tr class="separator:ga81259bc71fd3bd81b96e47f9f4ea7b67"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae39150dd6910d2776484526059911b79"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__pio.html#gae39150dd6910d2776484526059911b79">pio_set_irq1_source_mask_enabled</a> (<a class="el" href="structpio__hw__t.html">PIO</a> pio, uint32_t source_mask, bool enabled)</td></tr>
<tr class="memdesc:gae39150dd6910d2776484526059911b79"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enable/Disable multiple sources on a PIO's IRQ 1.  <a href="group__hardware__pio.html#gae39150dd6910d2776484526059911b79">More...</a><br /></td></tr>
<tr class="separator:gae39150dd6910d2776484526059911b79"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga06d0fd918247a86e8394afac67cf6992"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__pio.html#ga06d0fd918247a86e8394afac67cf6992">pio_set_irqn_source_enabled</a> (<a class="el" href="structpio__hw__t.html">PIO</a> pio, uint irq_index, <a class="el" href="group__hardware__pio.html#gab9e9aed4bb165a040415ae342e0902fe">pio_interrupt_source_t</a> source, bool enabled)</td></tr>
<tr class="memdesc:ga06d0fd918247a86e8394afac67cf6992"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enable/Disable a single source on a PIO's specified (0/1) IRQ index.  <a href="group__hardware__pio.html#ga06d0fd918247a86e8394afac67cf6992">More...</a><br /></td></tr>
<tr class="separator:ga06d0fd918247a86e8394afac67cf6992"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gafc173eb3cb980ed3c823384e42e265bb"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__pio.html#gafc173eb3cb980ed3c823384e42e265bb">pio_set_irqn_source_mask_enabled</a> (<a class="el" href="structpio__hw__t.html">PIO</a> pio, uint irq_index, uint32_t source_mask, bool enabled)</td></tr>
<tr class="memdesc:gafc173eb3cb980ed3c823384e42e265bb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enable/Disable multiple sources on a PIO's specified (0/1) IRQ index.  <a href="group__hardware__pio.html#gafc173eb3cb980ed3c823384e42e265bb">More...</a><br /></td></tr>
<tr class="separator:gafc173eb3cb980ed3c823384e42e265bb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa92c20b2d08f3b8a6bc35cd602a092e4"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__pio.html#gaa92c20b2d08f3b8a6bc35cd602a092e4">pio_interrupt_get</a> (<a class="el" href="structpio__hw__t.html">PIO</a> pio, uint pio_interrupt_num)</td></tr>
<tr class="memdesc:gaa92c20b2d08f3b8a6bc35cd602a092e4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Determine if a particular PIO interrupt is set.  <a href="group__hardware__pio.html#gaa92c20b2d08f3b8a6bc35cd602a092e4">More...</a><br /></td></tr>
<tr class="separator:gaa92c20b2d08f3b8a6bc35cd602a092e4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga6f650eb98640eac2346ff26b46dc378b"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__pio.html#ga6f650eb98640eac2346ff26b46dc378b">pio_interrupt_clear</a> (<a class="el" href="structpio__hw__t.html">PIO</a> pio, uint pio_interrupt_num)</td></tr>
<tr class="memdesc:ga6f650eb98640eac2346ff26b46dc378b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Clear a particular PIO interrupt.  <a href="group__hardware__pio.html#ga6f650eb98640eac2346ff26b46dc378b">More...</a><br /></td></tr>
<tr class="separator:ga6f650eb98640eac2346ff26b46dc378b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga9c0ea409da4fcb98586120b575921c31"><td class="memItemLeft" align="right" valign="top">static uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__pio.html#ga9c0ea409da4fcb98586120b575921c31">pio_sm_get_pc</a> (<a class="el" href="structpio__hw__t.html">PIO</a> pio, uint sm)</td></tr>
<tr class="memdesc:ga9c0ea409da4fcb98586120b575921c31"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the current program counter for a state machine.  <a href="group__hardware__pio.html#ga9c0ea409da4fcb98586120b575921c31">More...</a><br /></td></tr>
<tr class="separator:ga9c0ea409da4fcb98586120b575921c31"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga800d8949b5d04dfe635d4c12241f0cd2"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__pio.html#ga800d8949b5d04dfe635d4c12241f0cd2">pio_sm_exec</a> (<a class="el" href="structpio__hw__t.html">PIO</a> pio, uint sm, uint instr)</td></tr>
<tr class="memdesc:ga800d8949b5d04dfe635d4c12241f0cd2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Immediately execute an instruction on a state machine.  <a href="group__hardware__pio.html#ga800d8949b5d04dfe635d4c12241f0cd2">More...</a><br /></td></tr>
<tr class="separator:ga800d8949b5d04dfe635d4c12241f0cd2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaaa44e504a2abd8ca2c1ee2db91d0652b"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__pio.html#gaaa44e504a2abd8ca2c1ee2db91d0652b">pio_sm_is_exec_stalled</a> (<a class="el" href="structpio__hw__t.html">PIO</a> pio, uint sm)</td></tr>
<tr class="memdesc:gaaa44e504a2abd8ca2c1ee2db91d0652b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Determine if an instruction set by <a class="el" href="group__hardware__pio.html#ga800d8949b5d04dfe635d4c12241f0cd2" title="Immediately execute an instruction on a state machine.">pio_sm_exec()</a> is stalled executing.  <a href="group__hardware__pio.html#gaaa44e504a2abd8ca2c1ee2db91d0652b">More...</a><br /></td></tr>
<tr class="separator:gaaa44e504a2abd8ca2c1ee2db91d0652b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga1bf1b296713b76e19b87b59b84136b2c"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__pio.html#ga1bf1b296713b76e19b87b59b84136b2c">pio_sm_exec_wait_blocking</a> (<a class="el" href="structpio__hw__t.html">PIO</a> pio, uint sm, uint instr)</td></tr>
<tr class="memdesc:ga1bf1b296713b76e19b87b59b84136b2c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Immediately execute an instruction on a state machine and wait for it to complete.  <a href="group__hardware__pio.html#ga1bf1b296713b76e19b87b59b84136b2c">More...</a><br /></td></tr>
<tr class="separator:ga1bf1b296713b76e19b87b59b84136b2c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga74a681208957ab2bc8c8aafff9bb9f7c"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__pio.html#ga74a681208957ab2bc8c8aafff9bb9f7c">pio_sm_set_wrap</a> (<a class="el" href="structpio__hw__t.html">PIO</a> pio, uint sm, uint wrap_target, uint wrap)</td></tr>
<tr class="memdesc:ga74a681208957ab2bc8c8aafff9bb9f7c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the current wrap configuration for a state machine.  <a href="group__hardware__pio.html#ga74a681208957ab2bc8c8aafff9bb9f7c">More...</a><br /></td></tr>
<tr class="separator:ga74a681208957ab2bc8c8aafff9bb9f7c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga7f0190e662c5b6e24d91044b42010ffc"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__pio.html#ga7f0190e662c5b6e24d91044b42010ffc">pio_sm_set_out_pins</a> (<a class="el" href="structpio__hw__t.html">PIO</a> pio, uint sm, uint out_base, uint out_count)</td></tr>
<tr class="memdesc:ga7f0190e662c5b6e24d91044b42010ffc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the current 'out' pins for a state machine.  <a href="group__hardware__pio.html#ga7f0190e662c5b6e24d91044b42010ffc">More...</a><br /></td></tr>
<tr class="separator:ga7f0190e662c5b6e24d91044b42010ffc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gacaf6ee284dc834fbb742d1eef6180e6c"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__pio.html#gacaf6ee284dc834fbb742d1eef6180e6c">pio_sm_set_set_pins</a> (<a class="el" href="structpio__hw__t.html">PIO</a> pio, uint sm, uint set_base, uint set_count)</td></tr>
<tr class="memdesc:gacaf6ee284dc834fbb742d1eef6180e6c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the current 'set' pins for a state machine.  <a href="group__hardware__pio.html#gacaf6ee284dc834fbb742d1eef6180e6c">More...</a><br /></td></tr>
<tr class="separator:gacaf6ee284dc834fbb742d1eef6180e6c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaef50ef92f7ea0666dffe939c0b3fd24c"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__pio.html#gaef50ef92f7ea0666dffe939c0b3fd24c">pio_sm_set_in_pins</a> (<a class="el" href="structpio__hw__t.html">PIO</a> pio, uint sm, uint in_base)</td></tr>
<tr class="memdesc:gaef50ef92f7ea0666dffe939c0b3fd24c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the current 'in' pins for a state machine.  <a href="group__hardware__pio.html#gaef50ef92f7ea0666dffe939c0b3fd24c">More...</a><br /></td></tr>
<tr class="separator:gaef50ef92f7ea0666dffe939c0b3fd24c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga87cb36afe5783e2e92bf528b1d50ea07"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__pio.html#ga87cb36afe5783e2e92bf528b1d50ea07">pio_sm_set_sideset_pins</a> (<a class="el" href="structpio__hw__t.html">PIO</a> pio, uint sm, uint sideset_base)</td></tr>
<tr class="memdesc:ga87cb36afe5783e2e92bf528b1d50ea07"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the current 'sideset' pins for a state machine.  <a href="group__hardware__pio.html#ga87cb36afe5783e2e92bf528b1d50ea07">More...</a><br /></td></tr>
<tr class="separator:ga87cb36afe5783e2e92bf528b1d50ea07"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga97b135c9016b91fbf237c93313d25fd4"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__pio.html#ga97b135c9016b91fbf237c93313d25fd4">pio_sm_set_jmp_pin</a> (<a class="el" href="structpio__hw__t.html">PIO</a> pio, uint sm, uint pin)</td></tr>
<tr class="memdesc:ga97b135c9016b91fbf237c93313d25fd4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the 'jmp' pin for a state machine.  <a href="group__hardware__pio.html#ga97b135c9016b91fbf237c93313d25fd4">More...</a><br /></td></tr>
<tr class="separator:ga97b135c9016b91fbf237c93313d25fd4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab48b30da795dcd73b4a998d67a4af235"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__pio.html#gab48b30da795dcd73b4a998d67a4af235">pio_sm_put</a> (<a class="el" href="structpio__hw__t.html">PIO</a> pio, uint sm, uint32_t data)</td></tr>
<tr class="memdesc:gab48b30da795dcd73b4a998d67a4af235"><td class="mdescLeft">&#160;</td><td class="mdescRight">Write a word of data to a state machine's TX FIFO.  <a href="group__hardware__pio.html#gab48b30da795dcd73b4a998d67a4af235">More...</a><br /></td></tr>
<tr class="separator:gab48b30da795dcd73b4a998d67a4af235"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga6fe6273d63665fdb16964790d55709fa"><td class="memItemLeft" align="right" valign="top">static uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__pio.html#ga6fe6273d63665fdb16964790d55709fa">pio_sm_get</a> (<a class="el" href="structpio__hw__t.html">PIO</a> pio, uint sm)</td></tr>
<tr class="memdesc:ga6fe6273d63665fdb16964790d55709fa"><td class="mdescLeft">&#160;</td><td class="mdescRight">Read a word of data from a state machine's RX FIFO.  <a href="group__hardware__pio.html#ga6fe6273d63665fdb16964790d55709fa">More...</a><br /></td></tr>
<tr class="separator:ga6fe6273d63665fdb16964790d55709fa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga71e388315eb6a77a6560b77ec13145a4"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__pio.html#ga71e388315eb6a77a6560b77ec13145a4">pio_sm_is_rx_fifo_full</a> (<a class="el" href="structpio__hw__t.html">PIO</a> pio, uint sm)</td></tr>
<tr class="memdesc:ga71e388315eb6a77a6560b77ec13145a4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Determine if a state machine's RX FIFO is full.  <a href="group__hardware__pio.html#ga71e388315eb6a77a6560b77ec13145a4">More...</a><br /></td></tr>
<tr class="separator:ga71e388315eb6a77a6560b77ec13145a4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gadf404ba44b7f83e79fd6b57b3e2c89df"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__pio.html#gadf404ba44b7f83e79fd6b57b3e2c89df">pio_sm_is_rx_fifo_empty</a> (<a class="el" href="structpio__hw__t.html">PIO</a> pio, uint sm)</td></tr>
<tr class="memdesc:gadf404ba44b7f83e79fd6b57b3e2c89df"><td class="mdescLeft">&#160;</td><td class="mdescRight">Determine if a state machine's RX FIFO is empty.  <a href="group__hardware__pio.html#gadf404ba44b7f83e79fd6b57b3e2c89df">More...</a><br /></td></tr>
<tr class="separator:gadf404ba44b7f83e79fd6b57b3e2c89df"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga8fa0b87fde0db10be2934de542f9d6c2"><td class="memItemLeft" align="right" valign="top">static uint&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__pio.html#ga8fa0b87fde0db10be2934de542f9d6c2">pio_sm_get_rx_fifo_level</a> (<a class="el" href="structpio__hw__t.html">PIO</a> pio, uint sm)</td></tr>
<tr class="memdesc:ga8fa0b87fde0db10be2934de542f9d6c2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the number of elements currently in a state machine's RX FIFO.  <a href="group__hardware__pio.html#ga8fa0b87fde0db10be2934de542f9d6c2">More...</a><br /></td></tr>
<tr class="separator:ga8fa0b87fde0db10be2934de542f9d6c2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga3dbf64343a2fba75549ee7b0351f7e52"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__pio.html#ga3dbf64343a2fba75549ee7b0351f7e52">pio_sm_is_tx_fifo_full</a> (<a class="el" href="structpio__hw__t.html">PIO</a> pio, uint sm)</td></tr>
<tr class="memdesc:ga3dbf64343a2fba75549ee7b0351f7e52"><td class="mdescLeft">&#160;</td><td class="mdescRight">Determine if a state machine's TX FIFO is full.  <a href="group__hardware__pio.html#ga3dbf64343a2fba75549ee7b0351f7e52">More...</a><br /></td></tr>
<tr class="separator:ga3dbf64343a2fba75549ee7b0351f7e52"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gadf4ae3f4a334c1dcac1b62b148508bf2"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__pio.html#gadf4ae3f4a334c1dcac1b62b148508bf2">pio_sm_is_tx_fifo_empty</a> (<a class="el" href="structpio__hw__t.html">PIO</a> pio, uint sm)</td></tr>
<tr class="memdesc:gadf4ae3f4a334c1dcac1b62b148508bf2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Determine if a state machine's TX FIFO is empty.  <a href="group__hardware__pio.html#gadf4ae3f4a334c1dcac1b62b148508bf2">More...</a><br /></td></tr>
<tr class="separator:gadf4ae3f4a334c1dcac1b62b148508bf2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga009b3f44f112208114972c32546dfddb"><td class="memItemLeft" align="right" valign="top">static uint&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__pio.html#ga009b3f44f112208114972c32546dfddb">pio_sm_get_tx_fifo_level</a> (<a class="el" href="structpio__hw__t.html">PIO</a> pio, uint sm)</td></tr>
<tr class="memdesc:ga009b3f44f112208114972c32546dfddb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the number of elements currently in a state machine's TX FIFO.  <a href="group__hardware__pio.html#ga009b3f44f112208114972c32546dfddb">More...</a><br /></td></tr>
<tr class="separator:ga009b3f44f112208114972c32546dfddb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaee8bfc3409cb8d93cccdeda3961bc377"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__pio.html#gaee8bfc3409cb8d93cccdeda3961bc377">pio_sm_put_blocking</a> (<a class="el" href="structpio__hw__t.html">PIO</a> pio, uint sm, uint32_t data)</td></tr>
<tr class="memdesc:gaee8bfc3409cb8d93cccdeda3961bc377"><td class="mdescLeft">&#160;</td><td class="mdescRight">Write a word of data to a state machine's TX FIFO, blocking if the FIFO is full.  <a href="group__hardware__pio.html#gaee8bfc3409cb8d93cccdeda3961bc377">More...</a><br /></td></tr>
<tr class="separator:gaee8bfc3409cb8d93cccdeda3961bc377"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga12650f49c110cb1bfd8092ab67210885"><td class="memItemLeft" align="right" valign="top">static uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__pio.html#ga12650f49c110cb1bfd8092ab67210885">pio_sm_get_blocking</a> (<a class="el" href="structpio__hw__t.html">PIO</a> pio, uint sm)</td></tr>
<tr class="memdesc:ga12650f49c110cb1bfd8092ab67210885"><td class="mdescLeft">&#160;</td><td class="mdescRight">Read a word of data from a state machine's RX FIFO, blocking if the FIFO is empty.  <a href="group__hardware__pio.html#ga12650f49c110cb1bfd8092ab67210885">More...</a><br /></td></tr>
<tr class="separator:ga12650f49c110cb1bfd8092ab67210885"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga46af88f03a0c5abe4d55d45c5b2ccfb7"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__pio.html#ga46af88f03a0c5abe4d55d45c5b2ccfb7">pio_sm_drain_tx_fifo</a> (<a class="el" href="structpio__hw__t.html">PIO</a> pio, uint sm)</td></tr>
<tr class="memdesc:ga46af88f03a0c5abe4d55d45c5b2ccfb7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Empty out a state machine's TX FIFO.  <a href="group__hardware__pio.html#ga46af88f03a0c5abe4d55d45c5b2ccfb7">More...</a><br /></td></tr>
<tr class="separator:ga46af88f03a0c5abe4d55d45c5b2ccfb7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa9d1d18a7decd0068b8a2a9159c9fd34"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__pio.html#gaa9d1d18a7decd0068b8a2a9159c9fd34">pio_sm_set_clkdiv_int_frac</a> (<a class="el" href="structpio__hw__t.html">PIO</a> pio, uint sm, uint16_t div_int, uint8_t div_frac)</td></tr>
<tr class="memdesc:gaa9d1d18a7decd0068b8a2a9159c9fd34"><td class="mdescLeft">&#160;</td><td class="mdescRight">set the current clock divider for a state machine using a 16:8 fraction  <a href="group__hardware__pio.html#gaa9d1d18a7decd0068b8a2a9159c9fd34">More...</a><br /></td></tr>
<tr class="separator:gaa9d1d18a7decd0068b8a2a9159c9fd34"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga88df92ae6a4ef3320b6565117aca885b"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__pio.html#ga88df92ae6a4ef3320b6565117aca885b">pio_sm_set_clkdiv</a> (<a class="el" href="structpio__hw__t.html">PIO</a> pio, uint sm, float div)</td></tr>
<tr class="memdesc:ga88df92ae6a4ef3320b6565117aca885b"><td class="mdescLeft">&#160;</td><td class="mdescRight">set the current clock divider for a state machine  <a href="group__hardware__pio.html#ga88df92ae6a4ef3320b6565117aca885b">More...</a><br /></td></tr>
<tr class="separator:ga88df92ae6a4ef3320b6565117aca885b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab4cb36e85ee8807b51fd03021adff9ca"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__pio.html#gab4cb36e85ee8807b51fd03021adff9ca">pio_sm_clear_fifos</a> (<a class="el" href="structpio__hw__t.html">PIO</a> pio, uint sm)</td></tr>
<tr class="memdesc:gab4cb36e85ee8807b51fd03021adff9ca"><td class="mdescLeft">&#160;</td><td class="mdescRight">Clear a state machine's TX and RX FIFOs.  <a href="group__hardware__pio.html#gab4cb36e85ee8807b51fd03021adff9ca">More...</a><br /></td></tr>
<tr class="separator:gab4cb36e85ee8807b51fd03021adff9ca"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga1286f306263b413a8002c9db2b433d8b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__pio.html#ga1286f306263b413a8002c9db2b433d8b">pio_sm_set_pins</a> (<a class="el" href="structpio__hw__t.html">PIO</a> pio, uint sm, uint32_t pin_values)</td></tr>
<tr class="memdesc:ga1286f306263b413a8002c9db2b433d8b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Use a state machine to set a value on all pins for the PIO instance.  <a href="group__hardware__pio.html#ga1286f306263b413a8002c9db2b433d8b">More...</a><br /></td></tr>
<tr class="separator:ga1286f306263b413a8002c9db2b433d8b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga963167ca42f67f79ec5de6b47d6027d5"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__pio.html#ga963167ca42f67f79ec5de6b47d6027d5">pio_sm_set_pins_with_mask</a> (<a class="el" href="structpio__hw__t.html">PIO</a> pio, uint sm, uint32_t pin_values, uint32_t pin_mask)</td></tr>
<tr class="memdesc:ga963167ca42f67f79ec5de6b47d6027d5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Use a state machine to set a value on multiple pins for the PIO instance.  <a href="group__hardware__pio.html#ga963167ca42f67f79ec5de6b47d6027d5">More...</a><br /></td></tr>
<tr class="separator:ga963167ca42f67f79ec5de6b47d6027d5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga8269f1ef4cb1e4b3b957d5f1fa6fc623"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__pio.html#ga8269f1ef4cb1e4b3b957d5f1fa6fc623">pio_sm_set_pindirs_with_mask</a> (<a class="el" href="structpio__hw__t.html">PIO</a> pio, uint sm, uint32_t pin_dirs, uint32_t pin_mask)</td></tr>
<tr class="memdesc:ga8269f1ef4cb1e4b3b957d5f1fa6fc623"><td class="mdescLeft">&#160;</td><td class="mdescRight">Use a state machine to set the pin directions for multiple pins for the PIO instance.  <a href="group__hardware__pio.html#ga8269f1ef4cb1e4b3b957d5f1fa6fc623">More...</a><br /></td></tr>
<tr class="separator:ga8269f1ef4cb1e4b3b957d5f1fa6fc623"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf5c965ef1ca21684630c8be2cf3e52e7"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__pio.html#gaf5c965ef1ca21684630c8be2cf3e52e7">pio_sm_set_consecutive_pindirs</a> (<a class="el" href="structpio__hw__t.html">PIO</a> pio, uint sm, uint pins_base, uint pin_count, bool is_out)</td></tr>
<tr class="memdesc:gaf5c965ef1ca21684630c8be2cf3e52e7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Use a state machine to set the same pin direction for multiple consecutive pins for the PIO instance.  <a href="group__hardware__pio.html#gaf5c965ef1ca21684630c8be2cf3e52e7">More...</a><br /></td></tr>
<tr class="separator:gaf5c965ef1ca21684630c8be2cf3e52e7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa75bc8b2060929ec2b2599da8081a99b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__pio.html#gaa75bc8b2060929ec2b2599da8081a99b">pio_sm_claim</a> (<a class="el" href="structpio__hw__t.html">PIO</a> pio, uint sm)</td></tr>
<tr class="memdesc:gaa75bc8b2060929ec2b2599da8081a99b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Mark a state machine as used.  <a href="group__hardware__pio.html#gaa75bc8b2060929ec2b2599da8081a99b">More...</a><br /></td></tr>
<tr class="separator:gaa75bc8b2060929ec2b2599da8081a99b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga4c25ad61f15a76499997102e126cbdfd"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__pio.html#ga4c25ad61f15a76499997102e126cbdfd">pio_claim_sm_mask</a> (<a class="el" href="structpio__hw__t.html">PIO</a> pio, uint sm_mask)</td></tr>
<tr class="memdesc:ga4c25ad61f15a76499997102e126cbdfd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Mark multiple state machines as used.  <a href="group__hardware__pio.html#ga4c25ad61f15a76499997102e126cbdfd">More...</a><br /></td></tr>
<tr class="separator:ga4c25ad61f15a76499997102e126cbdfd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga62328112de918932e4ed0955ce0054ab"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__pio.html#ga62328112de918932e4ed0955ce0054ab">pio_sm_unclaim</a> (<a class="el" href="structpio__hw__t.html">PIO</a> pio, uint sm)</td></tr>
<tr class="memdesc:ga62328112de918932e4ed0955ce0054ab"><td class="mdescLeft">&#160;</td><td class="mdescRight">Mark a state machine as no longer used.  <a href="group__hardware__pio.html#ga62328112de918932e4ed0955ce0054ab">More...</a><br /></td></tr>
<tr class="separator:ga62328112de918932e4ed0955ce0054ab"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga604c071438065c46c9f4f21bdb61befd"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__pio.html#ga604c071438065c46c9f4f21bdb61befd">pio_claim_unused_sm</a> (<a class="el" href="structpio__hw__t.html">PIO</a> pio, bool required)</td></tr>
<tr class="memdesc:ga604c071438065c46c9f4f21bdb61befd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Claim a free state machine on a PIO instance.  <a href="group__hardware__pio.html#ga604c071438065c46c9f4f21bdb61befd">More...</a><br /></td></tr>
<tr class="separator:ga604c071438065c46c9f4f21bdb61befd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga699fb7272e3cb5ab76a84fbf3640325d"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__pio.html#ga699fb7272e3cb5ab76a84fbf3640325d">pio_sm_is_claimed</a> (<a class="el" href="structpio__hw__t.html">PIO</a> pio, uint sm)</td></tr>
<tr class="memdesc:ga699fb7272e3cb5ab76a84fbf3640325d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Determine if a PIO state machine is claimed.  <a href="group__hardware__pio.html#ga699fb7272e3cb5ab76a84fbf3640325d">More...</a><br /></td></tr>
<tr class="separator:ga699fb7272e3cb5ab76a84fbf3640325d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga03abf744baa28e22a46fcf81452c47cf"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__pio.html#ga03abf744baa28e22a46fcf81452c47cf">pio_claim_free_sm_and_add_program</a> (const <a class="el" href="structpio__program.html">pio_program_t</a> *program, <a class="el" href="structpio__hw__t.html">PIO</a> *pio, uint *sm, uint *offset)</td></tr>
<tr class="memdesc:ga03abf744baa28e22a46fcf81452c47cf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Finds a PIO and statemachine and adds a program into PIO memory.  <a href="group__hardware__pio.html#ga03abf744baa28e22a46fcf81452c47cf">More...</a><br /></td></tr>
<tr class="separator:ga03abf744baa28e22a46fcf81452c47cf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga53c3bbe939b3c58585d0e19ffe91e18e"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__pio.html#ga53c3bbe939b3c58585d0e19ffe91e18e">pio_claim_free_sm_and_add_program_for_gpio_range</a> (const <a class="el" href="structpio__program.html">pio_program_t</a> *program, <a class="el" href="structpio__hw__t.html">PIO</a> *pio, uint *sm, uint *offset, uint gpio_base, uint gpio_count, bool set_gpio_base)</td></tr>
<tr class="memdesc:ga53c3bbe939b3c58585d0e19ffe91e18e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Finds a PIO and statemachine and adds a program into PIO memory.  <a href="group__hardware__pio.html#ga53c3bbe939b3c58585d0e19ffe91e18e">More...</a><br /></td></tr>
<tr class="separator:ga53c3bbe939b3c58585d0e19ffe91e18e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa8178ef68166e58260da3989bc5f06bd"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__pio.html#gaa8178ef68166e58260da3989bc5f06bd">pio_remove_program_and_unclaim_sm</a> (const <a class="el" href="structpio__program.html">pio_program_t</a> *program, <a class="el" href="structpio__hw__t.html">PIO</a> pio, uint sm, uint offset)</td></tr>
<tr class="memdesc:gaa8178ef68166e58260da3989bc5f06bd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Removes a program from PIO memory and unclaims the state machine.  <a href="group__hardware__pio.html#gaa8178ef68166e58260da3989bc5f06bd">More...</a><br /></td></tr>
<tr class="separator:gaa8178ef68166e58260da3989bc5f06bd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga29b350d20174699f5594fc46a35ca699"><td class="memItemLeft" align="right" valign="top">static int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__pio.html#ga29b350d20174699f5594fc46a35ca699">pio_get_irq_num</a> (<a class="el" href="structpio__hw__t.html">PIO</a> pio, uint irqn)</td></tr>
<tr class="memdesc:ga29b350d20174699f5594fc46a35ca699"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return an IRQ for a PIO hardware instance.  <a href="group__hardware__pio.html#ga29b350d20174699f5594fc46a35ca699">More...</a><br /></td></tr>
<tr class="separator:ga29b350d20174699f5594fc46a35ca699"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga89d26de56d58a6a1022dba7f21e84b4e"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="group__hardware__pio.html#gab9e9aed4bb165a040415ae342e0902fe">pio_interrupt_source_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__pio.html#ga89d26de56d58a6a1022dba7f21e84b4e">pio_get_tx_fifo_not_full_interrupt_source</a> (uint sm)</td></tr>
<tr class="memdesc:ga89d26de56d58a6a1022dba7f21e84b4e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the interrupt source for a state machines TX FIFO not full interrupt.  <a href="group__hardware__pio.html#ga89d26de56d58a6a1022dba7f21e84b4e">More...</a><br /></td></tr>
<tr class="separator:ga89d26de56d58a6a1022dba7f21e84b4e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gad821de9c14a966fc5c16321ed5df92b4"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="group__hardware__pio.html#gab9e9aed4bb165a040415ae342e0902fe">pio_interrupt_source_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__pio.html#gad821de9c14a966fc5c16321ed5df92b4">pio_get_rx_fifo_not_empty_interrupt_source</a> (uint sm)</td></tr>
<tr class="memdesc:gad821de9c14a966fc5c16321ed5df92b4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the interrupt source for a state machines RX FIFO not empty interrupt.  <a href="group__hardware__pio.html#gad821de9c14a966fc5c16321ed5df92b4">More...</a><br /></td></tr>
<tr class="separator:gad821de9c14a966fc5c16321ed5df92b4"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p >Programmable I/O (PIO) API. </p>
<p >A programmable input/output block (PIO) is a versatile hardware interface which can support a number of different IO standards.</p>
<p >There are two PIO blocks in the RP2040. </p>
<p >There are three PIO blocks in the RP2350 </p>
<p >Each PIO is programmable in the same sense as a processor: the four state machines independently execute short, sequential programs, to manipulate GPIOs and transfer data. Unlike a general purpose processor, PIO state machines are highly specialised for IO, with a focus on determinism, precise timing, and close integration with fixed-function hardware. Each state machine is equipped with:</p><ul>
<li>Two 32-bit shift registers – either direction, any shift count</li>
<li>Two 32-bit scratch registers</li>
<li>4×32 bit bus FIFO in each direction (TX/RX), reconfigurable as 8×32 in a single direction</li>
<li>Fractional clock divider (16 integer, 8 fractional bits)</li>
<li>Flexible GPIO mapping</li>
<li>DMA interface, sustained throughput up to 1 word per clock from system DMA</li>
<li>IRQ flag set/clear/status</li>
</ul>
<p >Full details of the PIO can be found in the appropriate RP-series datasheet. Note that there are additional features in the RP2350 PIO implementation that mean care should be taken when writing PIO code that needs to run on both the RP2040 and the RP2350. </p>
<h2 class="groupheader">Macro Definition Documentation</h2>
<a id="ga916d05e71da7f2173cd22b46bbfa0a11" name="ga916d05e71da7f2173cd22b46bbfa0a11"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga916d05e71da7f2173cd22b46bbfa0a11">&#9670;&nbsp;</a></span>pio0</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define pio0&#160;&#160;&#160;pio0_hw</td>
        </tr>
      </table>
</div><div class="memdoc">
<p >Identifier for the first (PIO 0) hardware PIO instance (for use in PIO functions).</p>
<p >e.g. pio_gpio_init(pio0, 5) </p>

</div>
</div>
<a id="ga923a261ba19804c404900228e99c9522" name="ga923a261ba19804c404900228e99c9522"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga923a261ba19804c404900228e99c9522">&#9670;&nbsp;</a></span>pio1</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define pio1&#160;&#160;&#160;pio1_hw</td>
        </tr>
      </table>
</div><div class="memdoc">
<p >Identifier for the second (PIO 1) hardware PIO instance (for use in PIO functions).</p>
<p >e.g. pio_gpio_init(pio1, 5) </p>

</div>
</div>
<a id="gab9eca729acb2cebdb1abb7793d0f5bdf" name="gab9eca729acb2cebdb1abb7793d0f5bdf"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gab9eca729acb2cebdb1abb7793d0f5bdf">&#9670;&nbsp;</a></span>PIO_DREQ_NUM</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define PIO_DREQ_NUM</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">pio, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">sm, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">is_tx&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the <a class="el" href="group__hardware__dma.html#ga8def0ea481095c94f3a0dd0b4fed999e">dreq_num_t</a> used for pacing DMA transfers to or from a given state machine's FIFOs on this PIO instance. If is_tx is true, then it is for transfers to the PIO state machine TX FIFO else for transfers from the PIO state machine RX FIFO. </p>
<p >Note this macro is intended to resolve at compile time, and does no parameter checking </p>

</div>
</div>
<a id="gaa26de7b3ef34fb86138bf376ab152577" name="gaa26de7b3ef34fb86138bf376ab152577"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaa26de7b3ef34fb86138bf376ab152577">&#9670;&nbsp;</a></span>PIO_FUNCSEL_NUM</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define PIO_FUNCSEL_NUM</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">pio, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">gpio&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns <a class="el" href="group__hardware__gpio.html#ga89b8e5e8a9c515260dea8d1fa96e72c9">gpio_function_t</a> needed to select the PIO function for the given PIO instance on the given GPIO. </p>
<p >Note this macro is intended to resolve at compile time, and does no parameter checking </p>

</div>
</div>
<a id="ga06134c14db82b7927d96faeb07ab0e8b" name="ga06134c14db82b7927d96faeb07ab0e8b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga06134c14db82b7927d96faeb07ab0e8b">&#9670;&nbsp;</a></span>PIO_INSTANCE</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define PIO_INSTANCE</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">instance</td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the PIO instance with the given PIO number. </p>
<p >Note this macro is intended to resolve at compile time, and does no parameter checking </p>

</div>
</div>
<a id="gaeb939c4541517980acf9de3ae4010624" name="gaeb939c4541517980acf9de3ae4010624"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaeb939c4541517980acf9de3ae4010624">&#9670;&nbsp;</a></span>PIO_IRQ_NUM</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define PIO_IRQ_NUM</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">pio, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">irqn&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the <a class="el" href="group__hardware__irq.html#gaf30862f51b5994ffd5863176a185d137">irq_num_t</a> for processor interrupts from the given PIO instance. </p>
<p >Note this macro is intended to resolve at compile time, and does no parameter checking </p>

</div>
</div>
<a id="ga79fcbff988c01df8285f05ce6ad3a86d" name="ga79fcbff988c01df8285f05ce6ad3a86d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga79fcbff988c01df8285f05ce6ad3a86d">&#9670;&nbsp;</a></span>PIO_NUM</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define PIO_NUM</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">pio</td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the PIO number for a PIO instance. </p>
<p >Note this macro is intended to resolve at compile time, and does no parameter checking </p>

</div>
</div>
<h2 class="groupheader">Enumeration Type Documentation</h2>
<a id="ga7d415b966abbc1c25315d0775d093356" name="ga7d415b966abbc1c25315d0775d093356"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga7d415b966abbc1c25315d0775d093356">&#9670;&nbsp;</a></span>pio_fifo_join</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="group__hardware__pio.html#ga7d415b966abbc1c25315d0775d093356">pio_fifo_join</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>FIFO join states. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="gga7d415b966abbc1c25315d0775d093356a1ecaeaf5a3d81338a276b30f019b05c4" name="gga7d415b966abbc1c25315d0775d093356a1ecaeaf5a3d81338a276b30f019b05c4"></a>PIO_FIFO_JOIN_NONE&#160;</td><td class="fielddoc"><p >TX FIFO length=4 is used for transmit, RX FIFO length=4 is used for receive. </p>
</td></tr>
<tr><td class="fieldname"><a id="gga7d415b966abbc1c25315d0775d093356a22a2cbf467019804e134a38d40249f50" name="gga7d415b966abbc1c25315d0775d093356a22a2cbf467019804e134a38d40249f50"></a>PIO_FIFO_JOIN_TX&#160;</td><td class="fielddoc"><p >TX FIFO length=8 is used for transmit, RX FIFO is disabled. </p>
</td></tr>
<tr><td class="fieldname"><a id="gga7d415b966abbc1c25315d0775d093356ab2cff7409baac4928fec469fe5b44ed0" name="gga7d415b966abbc1c25315d0775d093356ab2cff7409baac4928fec469fe5b44ed0"></a>PIO_FIFO_JOIN_RX&#160;</td><td class="fielddoc"><p >RX FIFO length=8 is used for receive, TX FIFO is disabled. </p>
</td></tr>
</table>

</div>
</div>
<a id="ga0e60c768ea29f296b5ef40c02211bbcc" name="ga0e60c768ea29f296b5ef40c02211bbcc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga0e60c768ea29f296b5ef40c02211bbcc">&#9670;&nbsp;</a></span>pio_interrupt_source</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="group__hardware__pio.html#ga0e60c768ea29f296b5ef40c02211bbcc">pio_interrupt_source</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>PIO interrupt source numbers for pio related IRQs. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="gga0e60c768ea29f296b5ef40c02211bbcca23610bee821f3f8fecbfad0e48c6d742" name="gga0e60c768ea29f296b5ef40c02211bbcca23610bee821f3f8fecbfad0e48c6d742"></a>pis_interrupt0&#160;</td><td class="fielddoc"><p >PIO interrupt 0 is raised. </p>
</td></tr>
<tr><td class="fieldname"><a id="gga0e60c768ea29f296b5ef40c02211bbcca6cd394d2b05ae5eec188d5283d16dc49" name="gga0e60c768ea29f296b5ef40c02211bbcca6cd394d2b05ae5eec188d5283d16dc49"></a>pis_interrupt1&#160;</td><td class="fielddoc"><p >PIO interrupt 1 is raised. </p>
</td></tr>
<tr><td class="fieldname"><a id="gga0e60c768ea29f296b5ef40c02211bbcca066e1cafa42ed6638c93cc09c9b1a0d4" name="gga0e60c768ea29f296b5ef40c02211bbcca066e1cafa42ed6638c93cc09c9b1a0d4"></a>pis_interrupt2&#160;</td><td class="fielddoc"><p >PIO interrupt 2 is raised. </p>
</td></tr>
<tr><td class="fieldname"><a id="gga0e60c768ea29f296b5ef40c02211bbcca94cf23106019a84873d6db52d1e8470f" name="gga0e60c768ea29f296b5ef40c02211bbcca94cf23106019a84873d6db52d1e8470f"></a>pis_interrupt3&#160;</td><td class="fielddoc"><p >PIO interrupt 3 is raised. </p>
</td></tr>
<tr><td class="fieldname"><a id="gga0e60c768ea29f296b5ef40c02211bbcca924b2a1d4b6d257ac13608729dcf9ee1" name="gga0e60c768ea29f296b5ef40c02211bbcca924b2a1d4b6d257ac13608729dcf9ee1"></a>pis_sm0_tx_fifo_not_full&#160;</td><td class="fielddoc"><p >State machine 0 TX FIFO is not full. </p>
</td></tr>
<tr><td class="fieldname"><a id="gga0e60c768ea29f296b5ef40c02211bbcca27452b43a8d5d40ab0ba25a195681d48" name="gga0e60c768ea29f296b5ef40c02211bbcca27452b43a8d5d40ab0ba25a195681d48"></a>pis_sm1_tx_fifo_not_full&#160;</td><td class="fielddoc"><p >State machine 1 TX FIFO is not full. </p>
</td></tr>
<tr><td class="fieldname"><a id="gga0e60c768ea29f296b5ef40c02211bbcca214d3bdb6ebc516c4094c4eb476d514d" name="gga0e60c768ea29f296b5ef40c02211bbcca214d3bdb6ebc516c4094c4eb476d514d"></a>pis_sm2_tx_fifo_not_full&#160;</td><td class="fielddoc"><p >State machine 2 TX FIFO is not full. </p>
</td></tr>
<tr><td class="fieldname"><a id="gga0e60c768ea29f296b5ef40c02211bbcca463c09bec3151921a18be2c548e97297" name="gga0e60c768ea29f296b5ef40c02211bbcca463c09bec3151921a18be2c548e97297"></a>pis_sm3_tx_fifo_not_full&#160;</td><td class="fielddoc"><p >State machine 3 TX FIFO is not full. </p>
</td></tr>
<tr><td class="fieldname"><a id="gga0e60c768ea29f296b5ef40c02211bbcca959e0b9e484719a0af543fb87a365d52" name="gga0e60c768ea29f296b5ef40c02211bbcca959e0b9e484719a0af543fb87a365d52"></a>pis_sm0_rx_fifo_not_empty&#160;</td><td class="fielddoc"><p >State machine 0 RX FIFO is not empty. </p>
</td></tr>
<tr><td class="fieldname"><a id="gga0e60c768ea29f296b5ef40c02211bbcca85ee2774a8e5dfaf61d3866a81cb381c" name="gga0e60c768ea29f296b5ef40c02211bbcca85ee2774a8e5dfaf61d3866a81cb381c"></a>pis_sm1_rx_fifo_not_empty&#160;</td><td class="fielddoc"><p >State machine 1 RX FIFO is not empty. </p>
</td></tr>
<tr><td class="fieldname"><a id="gga0e60c768ea29f296b5ef40c02211bbcca6d7f4a904cb634fd3f30f033874393ac" name="gga0e60c768ea29f296b5ef40c02211bbcca6d7f4a904cb634fd3f30f033874393ac"></a>pis_sm2_rx_fifo_not_empty&#160;</td><td class="fielddoc"><p >State machine 2 RX FIFO is not empty. </p>
</td></tr>
<tr><td class="fieldname"><a id="gga0e60c768ea29f296b5ef40c02211bbccaacce0dbc391b9bb05965b7bc1b6f7698" name="gga0e60c768ea29f296b5ef40c02211bbccaacce0dbc391b9bb05965b7bc1b6f7698"></a>pis_sm3_rx_fifo_not_empty&#160;</td><td class="fielddoc"><p >State machine 3 RX FIFO is not empty. </p>
</td></tr>
</table>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a id="gaefbd086e8e96fee073438dac3c20334c" name="gaefbd086e8e96fee073438dac3c20334c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaefbd086e8e96fee073438dac3c20334c">&#9670;&nbsp;</a></span>pio_add_program()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int pio_add_program </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structpio__hw__t.html">PIO</a>&#160;</td>
          <td class="paramname"><em>pio</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structpio__program.html">pio_program_t</a> *&#160;</td>
          <td class="paramname"><em>program</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Attempt to load the program. </p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__hardware__pio.html#gaa8aafe966a46f4de9be59f73cae65a4b" title="Determine whether the given program can (at the time of the call) be loaded onto the PIO instance.">pio_can_add_program()</a> if you need to check whether the program can be loaded</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pio</td><td>The PIO instance; e.g. <a class="el" href="group__hardware__pio.html#ga916d05e71da7f2173cd22b46bbfa0a11">pio0</a> or <a class="el" href="group__hardware__pio.html#ga923a261ba19804c404900228e99c9522">pio1</a> </td></tr>
    <tr><td class="paramname">program</td><td>the program definition </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the instruction memory offset the program is loaded at, or negative for error (for backwards compatibility with prior SDK the error value is -1 i.e. PICO_ERROR_GENERIC) </dd></dl>

</div>
</div>
<a id="ga12948478935f817218b64e1db3a8ebad" name="ga12948478935f817218b64e1db3a8ebad"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga12948478935f817218b64e1db3a8ebad">&#9670;&nbsp;</a></span>pio_add_program_at_offset()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int pio_add_program_at_offset </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structpio__hw__t.html">PIO</a>&#160;</td>
          <td class="paramname"><em>pio</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structpio__program.html">pio_program_t</a> *&#160;</td>
          <td class="paramname"><em>program</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>offset</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Attempt to load the program at the specified instruction memory offset. </p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__hardware__pio.html#gaafac789d94b0727bb02ea83a8786897f" title="Determine whether the given program can (at the time of the call) be loaded onto the PIO instance sta...">pio_can_add_program_at_offset()</a> if you need to check whether the program can be loaded</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pio</td><td>The PIO instance; e.g. <a class="el" href="group__hardware__pio.html#ga916d05e71da7f2173cd22b46bbfa0a11">pio0</a> or <a class="el" href="group__hardware__pio.html#ga923a261ba19804c404900228e99c9522">pio1</a> </td></tr>
    <tr><td class="paramname">program</td><td>the program definition </td></tr>
    <tr><td class="paramname">offset</td><td>the instruction memory offset wanted for the start of the program </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the instruction memory offset the program is loaded at, or negative for error (for backwards compatibility with prior SDK the error value is -1 i.e. PICO_ERROR_GENERIC) </dd></dl>

</div>
</div>
<a id="gaa8aafe966a46f4de9be59f73cae65a4b" name="gaa8aafe966a46f4de9be59f73cae65a4b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaa8aafe966a46f4de9be59f73cae65a4b">&#9670;&nbsp;</a></span>pio_can_add_program()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool pio_can_add_program </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structpio__hw__t.html">PIO</a>&#160;</td>
          <td class="paramname"><em>pio</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structpio__program.html">pio_program_t</a> *&#160;</td>
          <td class="paramname"><em>program</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Determine whether the given program can (at the time of the call) be loaded onto the PIO instance. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pio</td><td>The PIO instance; e.g. <a class="el" href="group__hardware__pio.html#ga916d05e71da7f2173cd22b46bbfa0a11">pio0</a> or <a class="el" href="group__hardware__pio.html#ga923a261ba19804c404900228e99c9522">pio1</a> </td></tr>
    <tr><td class="paramname">program</td><td>the program definition </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true if the program can be loaded; false if there is not suitable space in the instruction memory </dd></dl>

</div>
</div>
<a id="gaafac789d94b0727bb02ea83a8786897f" name="gaafac789d94b0727bb02ea83a8786897f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaafac789d94b0727bb02ea83a8786897f">&#9670;&nbsp;</a></span>pio_can_add_program_at_offset()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool pio_can_add_program_at_offset </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structpio__hw__t.html">PIO</a>&#160;</td>
          <td class="paramname"><em>pio</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structpio__program.html">pio_program_t</a> *&#160;</td>
          <td class="paramname"><em>program</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>offset</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Determine whether the given program can (at the time of the call) be loaded onto the PIO instance starting at a particular location. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pio</td><td>The PIO instance; e.g. <a class="el" href="group__hardware__pio.html#ga916d05e71da7f2173cd22b46bbfa0a11">pio0</a> or <a class="el" href="group__hardware__pio.html#ga923a261ba19804c404900228e99c9522">pio1</a> </td></tr>
    <tr><td class="paramname">program</td><td>the program definition </td></tr>
    <tr><td class="paramname">offset</td><td>the instruction memory offset wanted for the start of the program </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true if the program can be loaded at that location; false if there is not space in the instruction memory </dd></dl>

</div>
</div>
<a id="ga03abf744baa28e22a46fcf81452c47cf" name="ga03abf744baa28e22a46fcf81452c47cf"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga03abf744baa28e22a46fcf81452c47cf">&#9670;&nbsp;</a></span>pio_claim_free_sm_and_add_program()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool pio_claim_free_sm_and_add_program </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structpio__program.html">pio_program_t</a> *&#160;</td>
          <td class="paramname"><em>program</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structpio__hw__t.html">PIO</a> *&#160;</td>
          <td class="paramname"><em>pio</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint *&#160;</td>
          <td class="paramname"><em>sm</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint *&#160;</td>
          <td class="paramname"><em>offset</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Finds a PIO and statemachine and adds a program into PIO memory. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">program</td><td>PIO program to add </td></tr>
    <tr><td class="paramname">pio</td><td>Returns the PIO hardware instance or NULL if no PIO is available </td></tr>
    <tr><td class="paramname">sm</td><td>Returns the index of the PIO state machine that was claimed </td></tr>
    <tr><td class="paramname">offset</td><td>Returns the instruction memory offset of the start of the program </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true on success, false otherwise </dd></dl>
<dl class="section see"><dt>See also</dt><dd>pio_remove_program_unclaim_sm </dd></dl>

</div>
</div>
<a id="ga53c3bbe939b3c58585d0e19ffe91e18e" name="ga53c3bbe939b3c58585d0e19ffe91e18e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga53c3bbe939b3c58585d0e19ffe91e18e">&#9670;&nbsp;</a></span>pio_claim_free_sm_and_add_program_for_gpio_range()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool pio_claim_free_sm_and_add_program_for_gpio_range </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structpio__program.html">pio_program_t</a> *&#160;</td>
          <td class="paramname"><em>program</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structpio__hw__t.html">PIO</a> *&#160;</td>
          <td class="paramname"><em>pio</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint *&#160;</td>
          <td class="paramname"><em>sm</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint *&#160;</td>
          <td class="paramname"><em>offset</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>gpio_base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>gpio_count</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>set_gpio_base</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Finds a PIO and statemachine and adds a program into PIO memory. </p>
<p >This variation of <a class="el" href="group__hardware__pio.html#ga03abf744baa28e22a46fcf81452c47cf">pio_claim_free_sm_and_add_program</a> is useful on RP2350 QFN80 where the "GPIO Base" must be set per PIO instance to either address the 32 GPIOs (0-&gt;31) or the 32 GPIOS (16-47). No single PIO instance can interact with both pins 0-&gt;15 or 32-&gt;47 at the same time.</p>
<p >This method takes additional information about the GPIO pins needed (via gpi_base and gpio_count), and optionally will set the GPIO base (</p><dl class="section see"><dt>See also</dt><dd><a class="el" href="group__hardware__pio.html#ga332210f0e594b24bf64f4bb1c8f49be3" title="Set the base GPIO base for the PIO instance.">pio_set_gpio_base</a>) of an unused PIO instance if necessary</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">program</td><td>PIO program to add </td></tr>
    <tr><td class="paramname">pio</td><td>Returns the PIO hardware instance or NULL if no PIO is available </td></tr>
    <tr><td class="paramname">sm</td><td>Returns the index of the PIO state machine that was claimed </td></tr>
    <tr><td class="paramname">offset</td><td>Returns the instruction memory offset of the start of the program </td></tr>
    <tr><td class="paramname">gpio_base</td><td>the lowest GPIO number required </td></tr>
    <tr><td class="paramname">gpio_count</td><td>the count of GPIOs required </td></tr>
    <tr><td class="paramname">set_gpio_base</td><td>if there is no free SM on a PIO instance with the right GPIO base, and there IS an unused PIO instance, then that PIO will be reconfigured so that this method can succeed</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true on success, false otherwise </dd></dl>
<dl class="section see"><dt>See also</dt><dd>pio_remove_program_unclaim_sm </dd></dl>

</div>
</div>
<a id="ga4c25ad61f15a76499997102e126cbdfd" name="ga4c25ad61f15a76499997102e126cbdfd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga4c25ad61f15a76499997102e126cbdfd">&#9670;&nbsp;</a></span>pio_claim_sm_mask()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void pio_claim_sm_mask </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structpio__hw__t.html">PIO</a>&#160;</td>
          <td class="paramname"><em>pio</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>sm_mask</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Mark multiple state machines as used. </p>
<p >Method for cooperative claiming of hardware. Will cause a panic if any of the state machines are already claimed. Use of this method by libraries detects accidental configurations that would fail in unpredictable ways.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pio</td><td>The PIO instance; e.g. <a class="el" href="group__hardware__pio.html#ga916d05e71da7f2173cd22b46bbfa0a11">pio0</a> or <a class="el" href="group__hardware__pio.html#ga923a261ba19804c404900228e99c9522">pio1</a> </td></tr>
    <tr><td class="paramname">sm_mask</td><td>Mask of state machine indexes </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga604c071438065c46c9f4f21bdb61befd" name="ga604c071438065c46c9f4f21bdb61befd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga604c071438065c46c9f4f21bdb61befd">&#9670;&nbsp;</a></span>pio_claim_unused_sm()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int pio_claim_unused_sm </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structpio__hw__t.html">PIO</a>&#160;</td>
          <td class="paramname"><em>pio</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>required</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Claim a free state machine on a PIO instance. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pio</td><td>The PIO instance; e.g. <a class="el" href="group__hardware__pio.html#ga916d05e71da7f2173cd22b46bbfa0a11">pio0</a> or <a class="el" href="group__hardware__pio.html#ga923a261ba19804c404900228e99c9522">pio1</a> </td></tr>
    <tr><td class="paramname">required</td><td>if true the function will panic if none are available </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the state machine index or negative if required was false, and none were free (for backwards compatibility with prior SDK the error value is -1 i.e. PICO_ERROR_GENERIC) </dd></dl>

</div>
</div>
<a id="ga850396a2a2925bbcc97247a629ca5bd2" name="ga850396a2a2925bbcc97247a629ca5bd2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga850396a2a2925bbcc97247a629ca5bd2">&#9670;&nbsp;</a></span>pio_clear_instruction_memory()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void pio_clear_instruction_memory </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structpio__hw__t.html">PIO</a>&#160;</td>
          <td class="paramname"><em>pio</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Clears all of a PIO instance's instruction memory. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pio</td><td>The PIO instance; e.g. <a class="el" href="group__hardware__pio.html#ga916d05e71da7f2173cd22b46bbfa0a11">pio0</a> or <a class="el" href="group__hardware__pio.html#ga923a261ba19804c404900228e99c9522">pio1</a> </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga63e13f639ae50ee9cb8afeceba6bb118" name="ga63e13f639ae50ee9cb8afeceba6bb118"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga63e13f639ae50ee9cb8afeceba6bb118">&#9670;&nbsp;</a></span>pio_clkdiv_restart_sm_mask()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void pio_clkdiv_restart_sm_mask </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structpio__hw__t.html">PIO</a>&#160;</td>
          <td class="paramname"><em>pio</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>mask</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Restart multiple state machines' clock dividers from a phase of 0. </p>
<p >Each state machine's clock divider is a free-running piece of hardware, that generates a pattern of clock enable pulses for the state machine, based <em>only</em> on the configured integer/fractional divisor. The pattern of running/halted cycles slows the state machine's execution to some controlled rate.</p>
<p >This function simultaneously clears the integer and fractional phase accumulators of multiple state machines' clock dividers. If these state machines all have the same integer and fractional divisors configured, their clock dividers will run in precise deterministic lockstep from this point.</p>
<p >With their execution clocks synchronised in this way, it is then safe to e.g. have multiple state machines performing a 'wait irq' on the same flag, and all clear it on the same cycle.</p>
<p >Also note that this function can be called whilst state machines are running (e.g. if you have just changed the clock divisors of some state machines and wish to resynchronise them), and that disabling a state machine does not halt its clock divider: that is, if multiple state machines have their clocks synchronised, you can safely disable and re-enable one of the state machines without losing synchronisation.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pio</td><td>The PIO instance; e.g. <a class="el" href="group__hardware__pio.html#ga916d05e71da7f2173cd22b46bbfa0a11">pio0</a> or <a class="el" href="group__hardware__pio.html#ga923a261ba19804c404900228e99c9522">pio1</a> </td></tr>
    <tr><td class="paramname">mask</td><td>bit mask of state machine indexes to modify the enabled state of </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="gac3797a9f7e80606152eb44af9ca96398" name="gac3797a9f7e80606152eb44af9ca96398"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gac3797a9f7e80606152eb44af9ca96398">&#9670;&nbsp;</a></span>pio_enable_sm_mask_in_sync()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void pio_enable_sm_mask_in_sync </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structpio__hw__t.html">PIO</a>&#160;</td>
          <td class="paramname"><em>pio</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>mask</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Enable multiple PIO state machines synchronizing their clock dividers. </p>
<p >This is equivalent to calling both <a class="el" href="group__hardware__pio.html#gaf726f77ee21f5373cadf064a4e0b4935" title="Enable or disable multiple PIO state machines.">pio_set_sm_mask_enabled()</a> and <a class="el" href="group__hardware__pio.html#ga63e13f639ae50ee9cb8afeceba6bb118" title="Restart multiple state machines&#39; clock dividers from a phase of 0.">pio_clkdiv_restart_sm_mask()</a> on the <em>same</em> clock cycle. All state machines specified by 'mask' are started simultaneously and, assuming they have the same clock divisors, their divided clocks will stay precisely synchronised.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pio</td><td>The PIO instance; e.g. <a class="el" href="group__hardware__pio.html#ga916d05e71da7f2173cd22b46bbfa0a11">pio0</a> or <a class="el" href="group__hardware__pio.html#ga923a261ba19804c404900228e99c9522">pio1</a> </td></tr>
    <tr><td class="paramname">mask</td><td>bit mask of state machine indexes to modify the enabled state of </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga4091eef7afda5200a3988b9412fe3b3f" name="ga4091eef7afda5200a3988b9412fe3b3f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga4091eef7afda5200a3988b9412fe3b3f">&#9670;&nbsp;</a></span>pio_get_dreq()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static uint pio_get_dreq </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structpio__hw__t.html">PIO</a>&#160;</td>
          <td class="paramname"><em>pio</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>sm</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>is_tx</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Return the DREQ to use for pacing transfers to/from a particular state machine FIFO. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pio</td><td>The PIO instance; e.g. <a class="el" href="group__hardware__pio.html#ga916d05e71da7f2173cd22b46bbfa0a11">pio0</a> or <a class="el" href="group__hardware__pio.html#ga923a261ba19804c404900228e99c9522">pio1</a> </td></tr>
    <tr><td class="paramname">sm</td><td>State machine index (0..3) </td></tr>
    <tr><td class="paramname">is_tx</td><td>true for sending data to the state machine, false for receiving data from the state machine </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga9e150bfd3d43565a01f38a37fa2884d4" name="ga9e150bfd3d43565a01f38a37fa2884d4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga9e150bfd3d43565a01f38a37fa2884d4">&#9670;&nbsp;</a></span>pio_get_funcsel()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static uint pio_get_funcsel </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structpio__hw__t.html">PIO</a>&#160;</td>
          <td class="paramname"><em>pio</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Return the funcsel number of a PIO instance. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pio</td><td>The PIO instance; e.g. <a class="el" href="group__hardware__pio.html#ga916d05e71da7f2173cd22b46bbfa0a11">pio0</a> or <a class="el" href="group__hardware__pio.html#ga923a261ba19804c404900228e99c9522">pio1</a> </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the PIO instance number (0, 1, ...) </dd></dl>
<dl class="section see"><dt>See also</dt><dd>gpio_function </dd></dl>

</div>
</div>
<a id="ga89688fd1a941797cb0cc80dbbc4bbd5f" name="ga89688fd1a941797cb0cc80dbbc4bbd5f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga89688fd1a941797cb0cc80dbbc4bbd5f">&#9670;&nbsp;</a></span>pio_get_gpio_base()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static uint pio_get_gpio_base </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structpio__hw__t.html">PIO</a>&#160;</td>
          <td class="paramname"><em>pio</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Return the base GPIO base for the PIO instance. </p>
<p >This method always return 0 in RP2040 </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pio</td><td>The PIO instance; e.g. <a class="el" href="group__hardware__pio.html#ga916d05e71da7f2173cd22b46bbfa0a11">pio0</a> or <a class="el" href="group__hardware__pio.html#ga923a261ba19804c404900228e99c9522">pio1</a> </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the current GPIO base for the PIO instance </dd></dl>

</div>
</div>
<a id="gae86f691914b78d66b1394ae94f3f4aa6" name="gae86f691914b78d66b1394ae94f3f4aa6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gae86f691914b78d66b1394ae94f3f4aa6">&#9670;&nbsp;</a></span>pio_get_index()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static uint pio_get_index </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structpio__hw__t.html">PIO</a>&#160;</td>
          <td class="paramname"><em>pio</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Return the instance number of a PIO instance. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pio</td><td>The PIO instance; e.g. <a class="el" href="group__hardware__pio.html#ga916d05e71da7f2173cd22b46bbfa0a11">pio0</a> or <a class="el" href="group__hardware__pio.html#ga923a261ba19804c404900228e99c9522">pio1</a> </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the PIO instance number (0, 1, ...) </dd></dl>

</div>
</div>
<a id="ga151f87205041da11d3c69be5ddbd5653" name="ga151f87205041da11d3c69be5ddbd5653"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga151f87205041da11d3c69be5ddbd5653">&#9670;&nbsp;</a></span>pio_get_instance()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="structpio__hw__t.html">PIO</a> pio_get_instance </td>
          <td>(</td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>instance</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Convert PIO instance to hardware instance. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">instance</td><td>Instance of PIO, 0 or 1 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the PIO hardware instance </dd></dl>

</div>
</div>
<a id="ga29b350d20174699f5594fc46a35ca699" name="ga29b350d20174699f5594fc46a35ca699"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga29b350d20174699f5594fc46a35ca699">&#9670;&nbsp;</a></span>pio_get_irq_num()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static int pio_get_irq_num </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structpio__hw__t.html">PIO</a>&#160;</td>
          <td class="paramname"><em>pio</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>irqn</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Return an IRQ for a PIO hardware instance. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pio</td><td>PIO hardware instance </td></tr>
    <tr><td class="paramname">irqn</td><td>0 for PIOx_IRQ_0 or 1 for PIOx_IRQ_1 etc where x is the PIO number </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The IRQ number to use for the PIO </dd></dl>

</div>
</div>
<a id="gad821de9c14a966fc5c16321ed5df92b4" name="gad821de9c14a966fc5c16321ed5df92b4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gad821de9c14a966fc5c16321ed5df92b4">&#9670;&nbsp;</a></span>pio_get_rx_fifo_not_empty_interrupt_source()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="group__hardware__pio.html#gab9e9aed4bb165a040415ae342e0902fe">pio_interrupt_source_t</a> pio_get_rx_fifo_not_empty_interrupt_source </td>
          <td>(</td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>sm</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Return the interrupt source for a state machines RX FIFO not empty interrupt. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">sm</td><td>State machine index (0..3) </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The interrupt source number for use in <a class="el" href="group__hardware__pio.html#ga06d0fd918247a86e8394afac67cf6992">pio_set_irqn_source_enabled</a> or similar functions </dd></dl>

</div>
</div>
<a id="ga89d26de56d58a6a1022dba7f21e84b4e" name="ga89d26de56d58a6a1022dba7f21e84b4e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga89d26de56d58a6a1022dba7f21e84b4e">&#9670;&nbsp;</a></span>pio_get_tx_fifo_not_full_interrupt_source()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="group__hardware__pio.html#gab9e9aed4bb165a040415ae342e0902fe">pio_interrupt_source_t</a> pio_get_tx_fifo_not_full_interrupt_source </td>
          <td>(</td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>sm</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Return the interrupt source for a state machines TX FIFO not full interrupt. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">sm</td><td>State machine index (0..3) </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The interrupt source number for use in <a class="el" href="group__hardware__pio.html#ga06d0fd918247a86e8394afac67cf6992">pio_set_irqn_source_enabled</a> or similar functions </dd></dl>

</div>
</div>
<a id="gafa244b1be8f53a329db9d26298e054bb" name="gafa244b1be8f53a329db9d26298e054bb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gafa244b1be8f53a329db9d26298e054bb">&#9670;&nbsp;</a></span>pio_gpio_init()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void pio_gpio_init </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structpio__hw__t.html">PIO</a>&#160;</td>
          <td class="paramname"><em>pio</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>pin</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Setup the function select for a GPIO to use output from the given PIO instance. </p>
<p >PIO appears as an alternate function in the GPIO muxing, just like an SPI or UART. This function configures that multiplexing to connect a given PIO instance to a GPIO. Note that this is not necessary for a state machine to be able to read the <em>input</em> value from a GPIO, but only for it to set the output value or output enable.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pio</td><td>The PIO instance; e.g. <a class="el" href="group__hardware__pio.html#ga916d05e71da7f2173cd22b46bbfa0a11">pio0</a> or <a class="el" href="group__hardware__pio.html#ga923a261ba19804c404900228e99c9522">pio1</a> </td></tr>
    <tr><td class="paramname">pin</td><td>the GPIO pin whose function select to set </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga6f650eb98640eac2346ff26b46dc378b" name="ga6f650eb98640eac2346ff26b46dc378b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga6f650eb98640eac2346ff26b46dc378b">&#9670;&nbsp;</a></span>pio_interrupt_clear()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void pio_interrupt_clear </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structpio__hw__t.html">PIO</a>&#160;</td>
          <td class="paramname"><em>pio</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>pio_interrupt_num</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Clear a particular PIO interrupt. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pio</td><td>The PIO instance; e.g. <a class="el" href="group__hardware__pio.html#ga916d05e71da7f2173cd22b46bbfa0a11">pio0</a> or <a class="el" href="group__hardware__pio.html#ga923a261ba19804c404900228e99c9522">pio1</a> </td></tr>
    <tr><td class="paramname">pio_interrupt_num</td><td>the PIO interrupt number 0-7 </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="gaa92c20b2d08f3b8a6bc35cd602a092e4" name="gaa92c20b2d08f3b8a6bc35cd602a092e4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaa92c20b2d08f3b8a6bc35cd602a092e4">&#9670;&nbsp;</a></span>pio_interrupt_get()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static bool pio_interrupt_get </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structpio__hw__t.html">PIO</a>&#160;</td>
          <td class="paramname"><em>pio</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>pio_interrupt_num</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Determine if a particular PIO interrupt is set. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pio</td><td>The PIO instance; e.g. <a class="el" href="group__hardware__pio.html#ga916d05e71da7f2173cd22b46bbfa0a11">pio0</a> or <a class="el" href="group__hardware__pio.html#ga923a261ba19804c404900228e99c9522">pio1</a> </td></tr>
    <tr><td class="paramname">pio_interrupt_num</td><td>the PIO interrupt number 0-7 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true if corresponding PIO interrupt is currently set </dd></dl>

</div>
</div>
<a id="ga81c77d31aff72655977b658a9c37665e" name="ga81c77d31aff72655977b658a9c37665e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga81c77d31aff72655977b658a9c37665e">&#9670;&nbsp;</a></span>pio_remove_program()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void pio_remove_program </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structpio__hw__t.html">PIO</a>&#160;</td>
          <td class="paramname"><em>pio</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structpio__program.html">pio_program_t</a> *&#160;</td>
          <td class="paramname"><em>program</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>loaded_offset</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Remove a program from a PIO instance's instruction memory. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pio</td><td>The PIO instance; e.g. <a class="el" href="group__hardware__pio.html#ga916d05e71da7f2173cd22b46bbfa0a11">pio0</a> or <a class="el" href="group__hardware__pio.html#ga923a261ba19804c404900228e99c9522">pio1</a> </td></tr>
    <tr><td class="paramname">program</td><td>the program definition </td></tr>
    <tr><td class="paramname">loaded_offset</td><td>the loaded offset returned when the program was added </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="gaa8178ef68166e58260da3989bc5f06bd" name="gaa8178ef68166e58260da3989bc5f06bd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaa8178ef68166e58260da3989bc5f06bd">&#9670;&nbsp;</a></span>pio_remove_program_and_unclaim_sm()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void pio_remove_program_and_unclaim_sm </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structpio__program.html">pio_program_t</a> *&#160;</td>
          <td class="paramname"><em>program</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structpio__hw__t.html">PIO</a>&#160;</td>
          <td class="paramname"><em>pio</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>sm</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>offset</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Removes a program from PIO memory and unclaims the state machine. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">program</td><td>PIO program to remove from memory </td></tr>
    <tr><td class="paramname">pio</td><td>PIO hardware instance being used </td></tr>
    <tr><td class="paramname">sm</td><td>PIO state machine that was claimed </td></tr>
    <tr><td class="paramname">offset</td><td>offset of the program in PIO memory </td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__hardware__pio.html#ga03abf744baa28e22a46fcf81452c47cf" title="Finds a PIO and statemachine and adds a program into PIO memory.">pio_claim_free_sm_and_add_program</a> </dd></dl>

</div>
</div>
<a id="gae3e115fd41d9ac29c7a13b0c213bc2cd" name="gae3e115fd41d9ac29c7a13b0c213bc2cd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gae3e115fd41d9ac29c7a13b0c213bc2cd">&#9670;&nbsp;</a></span>pio_restart_sm_mask()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void pio_restart_sm_mask </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structpio__hw__t.html">PIO</a>&#160;</td>
          <td class="paramname"><em>pio</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>mask</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Restart multiple state machine with a known state. </p>
<p >This method clears the ISR, shift counters, clock divider counter pin write flags, delay counter, latched EXEC instruction, and IRQ wait condition.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pio</td><td>The PIO instance; e.g. <a class="el" href="group__hardware__pio.html#ga916d05e71da7f2173cd22b46bbfa0a11">pio0</a> or <a class="el" href="group__hardware__pio.html#ga923a261ba19804c404900228e99c9522">pio1</a> </td></tr>
    <tr><td class="paramname">mask</td><td>bit mask of state machine indexes to modify the enabled state of </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga332210f0e594b24bf64f4bb1c8f49be3" name="ga332210f0e594b24bf64f4bb1c8f49be3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga332210f0e594b24bf64f4bb1c8f49be3">&#9670;&nbsp;</a></span>pio_set_gpio_base()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int pio_set_gpio_base </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structpio__hw__t.html">PIO</a>&#160;</td>
          <td class="paramname"><em>pio</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>gpio_base</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set the base GPIO base for the PIO instance. </p>
<p >Since an individual PIO accesses only 32 pins, to be able to access more pins, the PIO instance must specify a base GPIO where the instance's "pin 0" maps. For RP2350 the valid values are 0 and 16, indicating the PIO instance has access to pins 0-31, or 16-47 respectively.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pio</td><td>The PIO instance; e.g. <a class="el" href="group__hardware__pio.html#ga916d05e71da7f2173cd22b46bbfa0a11">pio0</a> or <a class="el" href="group__hardware__pio.html#ga923a261ba19804c404900228e99c9522">pio1</a> </td></tr>
    <tr><td class="paramname">gpio_base</td><td>the GPIO base (either 0 or 16) </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>PICO_OK (0) on success, error code otherwise </dd></dl>

</div>
</div>
<a id="gafe39a664c508e08ef4c74b7c3c38bc07" name="gafe39a664c508e08ef4c74b7c3c38bc07"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gafe39a664c508e08ef4c74b7c3c38bc07">&#9670;&nbsp;</a></span>pio_set_irq0_source_enabled()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void pio_set_irq0_source_enabled </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structpio__hw__t.html">PIO</a>&#160;</td>
          <td class="paramname"><em>pio</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__hardware__pio.html#gab9e9aed4bb165a040415ae342e0902fe">pio_interrupt_source_t</a>&#160;</td>
          <td class="paramname"><em>source</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>enabled</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Enable/Disable a single source on a PIO's IRQ 0. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pio</td><td>The PIO instance; e.g. <a class="el" href="group__hardware__pio.html#ga916d05e71da7f2173cd22b46bbfa0a11">pio0</a> or <a class="el" href="group__hardware__pio.html#ga923a261ba19804c404900228e99c9522">pio1</a> </td></tr>
    <tr><td class="paramname">source</td><td>the source number (see <a class="el" href="group__hardware__pio.html#ga0e60c768ea29f296b5ef40c02211bbcc">pio_interrupt_source</a>) </td></tr>
    <tr><td class="paramname">enabled</td><td>true to enable IRQ 0 for the source, false to disable. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga81259bc71fd3bd81b96e47f9f4ea7b67" name="ga81259bc71fd3bd81b96e47f9f4ea7b67"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga81259bc71fd3bd81b96e47f9f4ea7b67">&#9670;&nbsp;</a></span>pio_set_irq0_source_mask_enabled()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void pio_set_irq0_source_mask_enabled </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structpio__hw__t.html">PIO</a>&#160;</td>
          <td class="paramname"><em>pio</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>source_mask</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>enabled</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Enable/Disable multiple sources on a PIO's IRQ 0. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pio</td><td>The PIO instance; e.g. <a class="el" href="group__hardware__pio.html#ga916d05e71da7f2173cd22b46bbfa0a11">pio0</a> or <a class="el" href="group__hardware__pio.html#ga923a261ba19804c404900228e99c9522">pio1</a> </td></tr>
    <tr><td class="paramname">source_mask</td><td>Mask of bits, one for each source number (see <a class="el" href="group__hardware__pio.html#ga0e60c768ea29f296b5ef40c02211bbcc">pio_interrupt_source</a>) to affect </td></tr>
    <tr><td class="paramname">enabled</td><td>true to enable all the sources specified in the mask on IRQ 0, false to disable all the sources specified in the mask on IRQ 0 </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga4369e665ee8d2db58a83eccad65c917c" name="ga4369e665ee8d2db58a83eccad65c917c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga4369e665ee8d2db58a83eccad65c917c">&#9670;&nbsp;</a></span>pio_set_irq1_source_enabled()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void pio_set_irq1_source_enabled </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structpio__hw__t.html">PIO</a>&#160;</td>
          <td class="paramname"><em>pio</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__hardware__pio.html#gab9e9aed4bb165a040415ae342e0902fe">pio_interrupt_source_t</a>&#160;</td>
          <td class="paramname"><em>source</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>enabled</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Enable/Disable a single source on a PIO's IRQ 1. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pio</td><td>The PIO instance; e.g. <a class="el" href="group__hardware__pio.html#ga916d05e71da7f2173cd22b46bbfa0a11">pio0</a> or <a class="el" href="group__hardware__pio.html#ga923a261ba19804c404900228e99c9522">pio1</a> </td></tr>
    <tr><td class="paramname">source</td><td>the source number (see <a class="el" href="group__hardware__pio.html#ga0e60c768ea29f296b5ef40c02211bbcc">pio_interrupt_source</a>) </td></tr>
    <tr><td class="paramname">enabled</td><td>true to enable IRQ 0 for the source, false to disable. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="gae39150dd6910d2776484526059911b79" name="gae39150dd6910d2776484526059911b79"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gae39150dd6910d2776484526059911b79">&#9670;&nbsp;</a></span>pio_set_irq1_source_mask_enabled()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void pio_set_irq1_source_mask_enabled </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structpio__hw__t.html">PIO</a>&#160;</td>
          <td class="paramname"><em>pio</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>source_mask</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>enabled</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Enable/Disable multiple sources on a PIO's IRQ 1. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pio</td><td>The PIO instance; e.g. <a class="el" href="group__hardware__pio.html#ga916d05e71da7f2173cd22b46bbfa0a11">pio0</a> or <a class="el" href="group__hardware__pio.html#ga923a261ba19804c404900228e99c9522">pio1</a> </td></tr>
    <tr><td class="paramname">source_mask</td><td>Mask of bits, one for each source number (see <a class="el" href="group__hardware__pio.html#ga0e60c768ea29f296b5ef40c02211bbcc">pio_interrupt_source</a>) to affect </td></tr>
    <tr><td class="paramname">enabled</td><td>true to enable all the sources specified in the mask on IRQ 1, false to disable all the source specified in the mask on IRQ 1 </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga06d0fd918247a86e8394afac67cf6992" name="ga06d0fd918247a86e8394afac67cf6992"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga06d0fd918247a86e8394afac67cf6992">&#9670;&nbsp;</a></span>pio_set_irqn_source_enabled()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void pio_set_irqn_source_enabled </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structpio__hw__t.html">PIO</a>&#160;</td>
          <td class="paramname"><em>pio</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>irq_index</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__hardware__pio.html#gab9e9aed4bb165a040415ae342e0902fe">pio_interrupt_source_t</a>&#160;</td>
          <td class="paramname"><em>source</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>enabled</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Enable/Disable a single source on a PIO's specified (0/1) IRQ index. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pio</td><td>The PIO instance; e.g. <a class="el" href="group__hardware__pio.html#ga916d05e71da7f2173cd22b46bbfa0a11">pio0</a> or <a class="el" href="group__hardware__pio.html#ga923a261ba19804c404900228e99c9522">pio1</a> </td></tr>
    <tr><td class="paramname">irq_index</td><td>the IRQ index; either 0 or 1 </td></tr>
    <tr><td class="paramname">source</td><td>the source number (see <a class="el" href="group__hardware__pio.html#ga0e60c768ea29f296b5ef40c02211bbcc">pio_interrupt_source</a>) </td></tr>
    <tr><td class="paramname">enabled</td><td>true to enable the source on the specified IRQ, false to disable. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="gafc173eb3cb980ed3c823384e42e265bb" name="gafc173eb3cb980ed3c823384e42e265bb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gafc173eb3cb980ed3c823384e42e265bb">&#9670;&nbsp;</a></span>pio_set_irqn_source_mask_enabled()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void pio_set_irqn_source_mask_enabled </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structpio__hw__t.html">PIO</a>&#160;</td>
          <td class="paramname"><em>pio</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>irq_index</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>source_mask</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>enabled</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Enable/Disable multiple sources on a PIO's specified (0/1) IRQ index. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pio</td><td>The PIO instance; e.g. <a class="el" href="group__hardware__pio.html#ga916d05e71da7f2173cd22b46bbfa0a11">pio0</a> or <a class="el" href="group__hardware__pio.html#ga923a261ba19804c404900228e99c9522">pio1</a> </td></tr>
    <tr><td class="paramname">irq_index</td><td>the IRQ index; either 0 or 1 </td></tr>
    <tr><td class="paramname">source_mask</td><td>Mask of bits, one for each source number (see <a class="el" href="group__hardware__pio.html#ga0e60c768ea29f296b5ef40c02211bbcc">pio_interrupt_source</a>) to affect </td></tr>
    <tr><td class="paramname">enabled</td><td>true to enable all the sources specified in the mask on the specified IRQ, false to disable all the sources specified in the mask on the specified IRQ </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="gaf726f77ee21f5373cadf064a4e0b4935" name="gaf726f77ee21f5373cadf064a4e0b4935"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaf726f77ee21f5373cadf064a4e0b4935">&#9670;&nbsp;</a></span>pio_set_sm_mask_enabled()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void pio_set_sm_mask_enabled </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structpio__hw__t.html">PIO</a>&#160;</td>
          <td class="paramname"><em>pio</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>mask</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>enabled</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Enable or disable multiple PIO state machines. </p>
<p >Note that this method just sets the enabled state of the state machine; if now enabled they continue exactly from where they left off.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__hardware__pio.html#gac3797a9f7e80606152eb44af9ca96398" title="Enable multiple PIO state machines synchronizing their clock dividers.">pio_enable_sm_mask_in_sync()</a> if you wish to enable multiple state machines and ensure their clock dividers are in sync.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pio</td><td>The PIO instance; e.g. <a class="el" href="group__hardware__pio.html#ga916d05e71da7f2173cd22b46bbfa0a11">pio0</a> or <a class="el" href="group__hardware__pio.html#ga923a261ba19804c404900228e99c9522">pio1</a> </td></tr>
    <tr><td class="paramname">mask</td><td>bit mask of state machine indexes to modify the enabled state of </td></tr>
    <tr><td class="paramname">enabled</td><td>true to enable the state machines; false to disable </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="gaa75bc8b2060929ec2b2599da8081a99b" name="gaa75bc8b2060929ec2b2599da8081a99b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaa75bc8b2060929ec2b2599da8081a99b">&#9670;&nbsp;</a></span>pio_sm_claim()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void pio_sm_claim </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structpio__hw__t.html">PIO</a>&#160;</td>
          <td class="paramname"><em>pio</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>sm</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Mark a state machine as used. </p>
<p >Method for cooperative claiming of hardware. Will cause a panic if the state machine is already claimed. Use of this method by libraries detects accidental configurations that would fail in unpredictable ways.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pio</td><td>The PIO instance; e.g. <a class="el" href="group__hardware__pio.html#ga916d05e71da7f2173cd22b46bbfa0a11">pio0</a> or <a class="el" href="group__hardware__pio.html#ga923a261ba19804c404900228e99c9522">pio1</a> </td></tr>
    <tr><td class="paramname">sm</td><td>State machine index (0..3) </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="gab4cb36e85ee8807b51fd03021adff9ca" name="gab4cb36e85ee8807b51fd03021adff9ca"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gab4cb36e85ee8807b51fd03021adff9ca">&#9670;&nbsp;</a></span>pio_sm_clear_fifos()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void pio_sm_clear_fifos </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structpio__hw__t.html">PIO</a>&#160;</td>
          <td class="paramname"><em>pio</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>sm</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Clear a state machine's TX and RX FIFOs. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pio</td><td>The PIO instance; e.g. <a class="el" href="group__hardware__pio.html#ga916d05e71da7f2173cd22b46bbfa0a11">pio0</a> or <a class="el" href="group__hardware__pio.html#ga923a261ba19804c404900228e99c9522">pio1</a> </td></tr>
    <tr><td class="paramname">sm</td><td>State machine index (0..3) </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="gacd981b2206b02eb1c4573a0f328d7819" name="gacd981b2206b02eb1c4573a0f328d7819"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gacd981b2206b02eb1c4573a0f328d7819">&#9670;&nbsp;</a></span>pio_sm_clkdiv_restart()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void pio_sm_clkdiv_restart </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structpio__hw__t.html">PIO</a>&#160;</td>
          <td class="paramname"><em>pio</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>sm</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Restart a state machine's clock divider from a phase of 0. </p>
<p >Each state machine's clock divider is a free-running piece of hardware, that generates a pattern of clock enable pulses for the state machine, based <em>only</em> on the configured integer/fractional divisor. The pattern of running/halted cycles slows the state machine's execution to some controlled rate.</p>
<p >This function clears the divider's integer and fractional phase accumulators so that it restarts this pattern from the beginning. It is called automatically by pio_sm_init() but can also be called at a later time, when you enable the state machine, to ensure precisely consistent timing each time you load and run a given PIO program.</p>
<p >More commonly this hardware mechanism is used to synchronise the execution clocks of multiple state machines &ndash; see <a class="el" href="group__hardware__pio.html#ga63e13f639ae50ee9cb8afeceba6bb118" title="Restart multiple state machines&#39; clock dividers from a phase of 0.">pio_clkdiv_restart_sm_mask()</a>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pio</td><td>The PIO instance; e.g. <a class="el" href="group__hardware__pio.html#ga916d05e71da7f2173cd22b46bbfa0a11">pio0</a> or <a class="el" href="group__hardware__pio.html#ga923a261ba19804c404900228e99c9522">pio1</a> </td></tr>
    <tr><td class="paramname">sm</td><td>State machine index (0..3) </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga46af88f03a0c5abe4d55d45c5b2ccfb7" name="ga46af88f03a0c5abe4d55d45c5b2ccfb7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga46af88f03a0c5abe4d55d45c5b2ccfb7">&#9670;&nbsp;</a></span>pio_sm_drain_tx_fifo()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void pio_sm_drain_tx_fifo </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structpio__hw__t.html">PIO</a>&#160;</td>
          <td class="paramname"><em>pio</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>sm</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Empty out a state machine's TX FIFO. </p>
<p >This method executes <code>pull</code> instructions on the state machine until the TX FIFO is empty. This disturbs the contents of the OSR, so see also <a class="el" href="group__hardware__pio.html#gab4cb36e85ee8807b51fd03021adff9ca" title="Clear a state machine&#39;s TX and RX FIFOs.">pio_sm_clear_fifos()</a> which clears both FIFOs but leaves the state machine's internal state undisturbed.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pio</td><td>The PIO instance; e.g. <a class="el" href="group__hardware__pio.html#ga916d05e71da7f2173cd22b46bbfa0a11">pio0</a> or <a class="el" href="group__hardware__pio.html#ga923a261ba19804c404900228e99c9522">pio1</a> </td></tr>
    <tr><td class="paramname">sm</td><td>State machine index (0..3)</td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__hardware__pio.html#gab4cb36e85ee8807b51fd03021adff9ca" title="Clear a state machine&#39;s TX and RX FIFOs.">pio_sm_clear_fifos()</a> </dd></dl>

</div>
</div>
<a id="ga800d8949b5d04dfe635d4c12241f0cd2" name="ga800d8949b5d04dfe635d4c12241f0cd2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga800d8949b5d04dfe635d4c12241f0cd2">&#9670;&nbsp;</a></span>pio_sm_exec()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void pio_sm_exec </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structpio__hw__t.html">PIO</a>&#160;</td>
          <td class="paramname"><em>pio</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>sm</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>instr</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Immediately execute an instruction on a state machine. </p>
<p >This instruction is executed instead of the next instruction in the normal control flow on the state machine. Subsequent calls to this method replace the previous executed instruction if it is still running. </p><dl class="section see"><dt>See also</dt><dd><a class="el" href="group__hardware__pio.html#gaaa44e504a2abd8ca2c1ee2db91d0652b" title="Determine if an instruction set by pio_sm_exec() is stalled executing.">pio_sm_is_exec_stalled()</a> to see if an executed instruction is still running (i.e. it is stalled on some condition)</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pio</td><td>The PIO instance; e.g. <a class="el" href="group__hardware__pio.html#ga916d05e71da7f2173cd22b46bbfa0a11">pio0</a> or <a class="el" href="group__hardware__pio.html#ga923a261ba19804c404900228e99c9522">pio1</a> </td></tr>
    <tr><td class="paramname">sm</td><td>State machine index (0..3) </td></tr>
    <tr><td class="paramname">instr</td><td>the encoded PIO instruction </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga1bf1b296713b76e19b87b59b84136b2c" name="ga1bf1b296713b76e19b87b59b84136b2c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga1bf1b296713b76e19b87b59b84136b2c">&#9670;&nbsp;</a></span>pio_sm_exec_wait_blocking()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void pio_sm_exec_wait_blocking </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structpio__hw__t.html">PIO</a>&#160;</td>
          <td class="paramname"><em>pio</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>sm</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>instr</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Immediately execute an instruction on a state machine and wait for it to complete. </p>
<p >This instruction is executed instead of the next instruction in the normal control flow on the state machine. Subsequent calls to this method replace the previous executed instruction if it is still running. </p><dl class="section see"><dt>See also</dt><dd><a class="el" href="group__hardware__pio.html#gaaa44e504a2abd8ca2c1ee2db91d0652b" title="Determine if an instruction set by pio_sm_exec() is stalled executing.">pio_sm_is_exec_stalled()</a> to see if an executed instruction is still running (i.e. it is stalled on some condition)</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pio</td><td>The PIO instance; e.g. <a class="el" href="group__hardware__pio.html#ga916d05e71da7f2173cd22b46bbfa0a11">pio0</a> or <a class="el" href="group__hardware__pio.html#ga923a261ba19804c404900228e99c9522">pio1</a> </td></tr>
    <tr><td class="paramname">sm</td><td>State machine index (0..3) </td></tr>
    <tr><td class="paramname">instr</td><td>the encoded PIO instruction </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga6fe6273d63665fdb16964790d55709fa" name="ga6fe6273d63665fdb16964790d55709fa"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga6fe6273d63665fdb16964790d55709fa">&#9670;&nbsp;</a></span>pio_sm_get()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static uint32_t pio_sm_get </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structpio__hw__t.html">PIO</a>&#160;</td>
          <td class="paramname"><em>pio</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>sm</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Read a word of data from a state machine's RX FIFO. </p>
<p >This is a raw FIFO access that does not check for emptiness. If the FIFO is empty, the hardware ignores the attempt to read from the FIFO (the FIFO remains in an empty state following the read) and the sticky RXUNDER flag for this FIFO is set in FDEBUG to indicate that the system tried to read from this FIFO when empty. The data returned by this function is undefined when the FIFO is empty.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pio</td><td>The PIO instance; e.g. <a class="el" href="group__hardware__pio.html#ga916d05e71da7f2173cd22b46bbfa0a11">pio0</a> or <a class="el" href="group__hardware__pio.html#ga923a261ba19804c404900228e99c9522">pio1</a> </td></tr>
    <tr><td class="paramname">sm</td><td>State machine index (0..3)</td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__hardware__pio.html#ga12650f49c110cb1bfd8092ab67210885" title="Read a word of data from a state machine&#39;s RX FIFO, blocking if the FIFO is empty.">pio_sm_get_blocking()</a> </dd></dl>

</div>
</div>
<a id="ga12650f49c110cb1bfd8092ab67210885" name="ga12650f49c110cb1bfd8092ab67210885"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga12650f49c110cb1bfd8092ab67210885">&#9670;&nbsp;</a></span>pio_sm_get_blocking()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static uint32_t pio_sm_get_blocking </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structpio__hw__t.html">PIO</a>&#160;</td>
          <td class="paramname"><em>pio</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>sm</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Read a word of data from a state machine's RX FIFO, blocking if the FIFO is empty. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pio</td><td>The PIO instance; e.g. <a class="el" href="group__hardware__pio.html#ga916d05e71da7f2173cd22b46bbfa0a11">pio0</a> or <a class="el" href="group__hardware__pio.html#ga923a261ba19804c404900228e99c9522">pio1</a> </td></tr>
    <tr><td class="paramname">sm</td><td>State machine index (0..3) </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga9c0ea409da4fcb98586120b575921c31" name="ga9c0ea409da4fcb98586120b575921c31"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga9c0ea409da4fcb98586120b575921c31">&#9670;&nbsp;</a></span>pio_sm_get_pc()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static uint8_t pio_sm_get_pc </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structpio__hw__t.html">PIO</a>&#160;</td>
          <td class="paramname"><em>pio</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>sm</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Return the current program counter for a state machine. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pio</td><td>The PIO instance; e.g. <a class="el" href="group__hardware__pio.html#ga916d05e71da7f2173cd22b46bbfa0a11">pio0</a> or <a class="el" href="group__hardware__pio.html#ga923a261ba19804c404900228e99c9522">pio1</a> </td></tr>
    <tr><td class="paramname">sm</td><td>State machine index (0..3) </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the program counter </dd></dl>

</div>
</div>
<a id="ga8fa0b87fde0db10be2934de542f9d6c2" name="ga8fa0b87fde0db10be2934de542f9d6c2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga8fa0b87fde0db10be2934de542f9d6c2">&#9670;&nbsp;</a></span>pio_sm_get_rx_fifo_level()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static uint pio_sm_get_rx_fifo_level </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structpio__hw__t.html">PIO</a>&#160;</td>
          <td class="paramname"><em>pio</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>sm</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Return the number of elements currently in a state machine's RX FIFO. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pio</td><td>The PIO instance; e.g. <a class="el" href="group__hardware__pio.html#ga916d05e71da7f2173cd22b46bbfa0a11">pio0</a> or <a class="el" href="group__hardware__pio.html#ga923a261ba19804c404900228e99c9522">pio1</a> </td></tr>
    <tr><td class="paramname">sm</td><td>State machine index (0..3) </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the number of elements in the RX FIFO </dd></dl>

</div>
</div>
<a id="ga009b3f44f112208114972c32546dfddb" name="ga009b3f44f112208114972c32546dfddb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga009b3f44f112208114972c32546dfddb">&#9670;&nbsp;</a></span>pio_sm_get_tx_fifo_level()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static uint pio_sm_get_tx_fifo_level </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structpio__hw__t.html">PIO</a>&#160;</td>
          <td class="paramname"><em>pio</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>sm</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Return the number of elements currently in a state machine's TX FIFO. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pio</td><td>The PIO instance; e.g. <a class="el" href="group__hardware__pio.html#ga916d05e71da7f2173cd22b46bbfa0a11">pio0</a> or <a class="el" href="group__hardware__pio.html#ga923a261ba19804c404900228e99c9522">pio1</a> </td></tr>
    <tr><td class="paramname">sm</td><td>State machine index (0..3) </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the number of elements in the TX FIFO </dd></dl>

</div>
</div>
<a id="ga699fb7272e3cb5ab76a84fbf3640325d" name="ga699fb7272e3cb5ab76a84fbf3640325d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga699fb7272e3cb5ab76a84fbf3640325d">&#9670;&nbsp;</a></span>pio_sm_is_claimed()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool pio_sm_is_claimed </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structpio__hw__t.html">PIO</a>&#160;</td>
          <td class="paramname"><em>pio</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>sm</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Determine if a PIO state machine is claimed. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pio</td><td>The PIO instance; e.g. <a class="el" href="group__hardware__pio.html#ga916d05e71da7f2173cd22b46bbfa0a11">pio0</a> or <a class="el" href="group__hardware__pio.html#ga923a261ba19804c404900228e99c9522">pio1</a> </td></tr>
    <tr><td class="paramname">sm</td><td>State machine index (0..3) </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true if claimed, false otherwise </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__hardware__pio.html#gaa75bc8b2060929ec2b2599da8081a99b" title="Mark a state machine as used.">pio_sm_claim</a> </dd>
<dd>
<a class="el" href="group__hardware__pio.html#ga4c25ad61f15a76499997102e126cbdfd" title="Mark multiple state machines as used.">pio_claim_sm_mask</a> </dd></dl>

</div>
</div>
<a id="gaaa44e504a2abd8ca2c1ee2db91d0652b" name="gaaa44e504a2abd8ca2c1ee2db91d0652b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaaa44e504a2abd8ca2c1ee2db91d0652b">&#9670;&nbsp;</a></span>pio_sm_is_exec_stalled()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static bool pio_sm_is_exec_stalled </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structpio__hw__t.html">PIO</a>&#160;</td>
          <td class="paramname"><em>pio</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>sm</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Determine if an instruction set by <a class="el" href="group__hardware__pio.html#ga800d8949b5d04dfe635d4c12241f0cd2" title="Immediately execute an instruction on a state machine.">pio_sm_exec()</a> is stalled executing. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pio</td><td>The PIO instance; e.g. <a class="el" href="group__hardware__pio.html#ga916d05e71da7f2173cd22b46bbfa0a11">pio0</a> or <a class="el" href="group__hardware__pio.html#ga923a261ba19804c404900228e99c9522">pio1</a> </td></tr>
    <tr><td class="paramname">sm</td><td>State machine index (0..3) </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true if the executed instruction is still running (stalled) </dd></dl>

</div>
</div>
<a id="gadf404ba44b7f83e79fd6b57b3e2c89df" name="gadf404ba44b7f83e79fd6b57b3e2c89df"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gadf404ba44b7f83e79fd6b57b3e2c89df">&#9670;&nbsp;</a></span>pio_sm_is_rx_fifo_empty()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static bool pio_sm_is_rx_fifo_empty </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structpio__hw__t.html">PIO</a>&#160;</td>
          <td class="paramname"><em>pio</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>sm</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Determine if a state machine's RX FIFO is empty. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pio</td><td>The PIO instance; e.g. <a class="el" href="group__hardware__pio.html#ga916d05e71da7f2173cd22b46bbfa0a11">pio0</a> or <a class="el" href="group__hardware__pio.html#ga923a261ba19804c404900228e99c9522">pio1</a> </td></tr>
    <tr><td class="paramname">sm</td><td>State machine index (0..3) </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true if the RX FIFO is empty </dd></dl>

</div>
</div>
<a id="ga71e388315eb6a77a6560b77ec13145a4" name="ga71e388315eb6a77a6560b77ec13145a4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga71e388315eb6a77a6560b77ec13145a4">&#9670;&nbsp;</a></span>pio_sm_is_rx_fifo_full()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static bool pio_sm_is_rx_fifo_full </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structpio__hw__t.html">PIO</a>&#160;</td>
          <td class="paramname"><em>pio</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>sm</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Determine if a state machine's RX FIFO is full. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pio</td><td>The PIO instance; e.g. <a class="el" href="group__hardware__pio.html#ga916d05e71da7f2173cd22b46bbfa0a11">pio0</a> or <a class="el" href="group__hardware__pio.html#ga923a261ba19804c404900228e99c9522">pio1</a> </td></tr>
    <tr><td class="paramname">sm</td><td>State machine index (0..3) </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true if the RX FIFO is full </dd></dl>

</div>
</div>
<a id="gadf4ae3f4a334c1dcac1b62b148508bf2" name="gadf4ae3f4a334c1dcac1b62b148508bf2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gadf4ae3f4a334c1dcac1b62b148508bf2">&#9670;&nbsp;</a></span>pio_sm_is_tx_fifo_empty()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static bool pio_sm_is_tx_fifo_empty </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structpio__hw__t.html">PIO</a>&#160;</td>
          <td class="paramname"><em>pio</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>sm</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Determine if a state machine's TX FIFO is empty. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pio</td><td>The PIO instance; e.g. <a class="el" href="group__hardware__pio.html#ga916d05e71da7f2173cd22b46bbfa0a11">pio0</a> or <a class="el" href="group__hardware__pio.html#ga923a261ba19804c404900228e99c9522">pio1</a> </td></tr>
    <tr><td class="paramname">sm</td><td>State machine index (0..3) </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true if the TX FIFO is empty </dd></dl>

</div>
</div>
<a id="ga3dbf64343a2fba75549ee7b0351f7e52" name="ga3dbf64343a2fba75549ee7b0351f7e52"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga3dbf64343a2fba75549ee7b0351f7e52">&#9670;&nbsp;</a></span>pio_sm_is_tx_fifo_full()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static bool pio_sm_is_tx_fifo_full </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structpio__hw__t.html">PIO</a>&#160;</td>
          <td class="paramname"><em>pio</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>sm</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Determine if a state machine's TX FIFO is full. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pio</td><td>The PIO instance; e.g. <a class="el" href="group__hardware__pio.html#ga916d05e71da7f2173cd22b46bbfa0a11">pio0</a> or <a class="el" href="group__hardware__pio.html#ga923a261ba19804c404900228e99c9522">pio1</a> </td></tr>
    <tr><td class="paramname">sm</td><td>State machine index (0..3) </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true if the TX FIFO is full </dd></dl>

</div>
</div>
<a id="gab48b30da795dcd73b4a998d67a4af235" name="gab48b30da795dcd73b4a998d67a4af235"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gab48b30da795dcd73b4a998d67a4af235">&#9670;&nbsp;</a></span>pio_sm_put()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void pio_sm_put </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structpio__hw__t.html">PIO</a>&#160;</td>
          <td class="paramname"><em>pio</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>sm</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Write a word of data to a state machine's TX FIFO. </p>
<p >This is a raw FIFO access that does not check for fullness. If the FIFO is full, the FIFO contents and state are not affected by the write attempt. Hardware sets the TXOVER sticky flag for this FIFO in FDEBUG, to indicate that the system attempted to write to a full FIFO.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pio</td><td>The PIO instance; e.g. <a class="el" href="group__hardware__pio.html#ga916d05e71da7f2173cd22b46bbfa0a11">pio0</a> or <a class="el" href="group__hardware__pio.html#ga923a261ba19804c404900228e99c9522">pio1</a> </td></tr>
    <tr><td class="paramname">sm</td><td>State machine index (0..3) </td></tr>
    <tr><td class="paramname">data</td><td>the 32 bit data value</td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__hardware__pio.html#gaee8bfc3409cb8d93cccdeda3961bc377" title="Write a word of data to a state machine&#39;s TX FIFO, blocking if the FIFO is full.">pio_sm_put_blocking()</a> </dd></dl>

</div>
</div>
<a id="gaee8bfc3409cb8d93cccdeda3961bc377" name="gaee8bfc3409cb8d93cccdeda3961bc377"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaee8bfc3409cb8d93cccdeda3961bc377">&#9670;&nbsp;</a></span>pio_sm_put_blocking()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void pio_sm_put_blocking </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structpio__hw__t.html">PIO</a>&#160;</td>
          <td class="paramname"><em>pio</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>sm</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Write a word of data to a state machine's TX FIFO, blocking if the FIFO is full. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pio</td><td>The PIO instance; e.g. <a class="el" href="group__hardware__pio.html#ga916d05e71da7f2173cd22b46bbfa0a11">pio0</a> or <a class="el" href="group__hardware__pio.html#ga923a261ba19804c404900228e99c9522">pio1</a> </td></tr>
    <tr><td class="paramname">sm</td><td>State machine index (0..3) </td></tr>
    <tr><td class="paramname">data</td><td>the 32 bit data value </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga7b89b93dd0553c77538c70baf6a7e4f0" name="ga7b89b93dd0553c77538c70baf6a7e4f0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga7b89b93dd0553c77538c70baf6a7e4f0">&#9670;&nbsp;</a></span>pio_sm_restart()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void pio_sm_restart </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structpio__hw__t.html">PIO</a>&#160;</td>
          <td class="paramname"><em>pio</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>sm</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Restart a state machine with a known state. </p>
<p >This method clears the ISR, shift counters, clock divider counter pin write flags, delay counter, latched EXEC instruction, and IRQ wait condition.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pio</td><td>The PIO instance; e.g. <a class="el" href="group__hardware__pio.html#ga916d05e71da7f2173cd22b46bbfa0a11">pio0</a> or <a class="el" href="group__hardware__pio.html#ga923a261ba19804c404900228e99c9522">pio1</a> </td></tr>
    <tr><td class="paramname">sm</td><td>State machine index (0..3) </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga88df92ae6a4ef3320b6565117aca885b" name="ga88df92ae6a4ef3320b6565117aca885b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga88df92ae6a4ef3320b6565117aca885b">&#9670;&nbsp;</a></span>pio_sm_set_clkdiv()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void pio_sm_set_clkdiv </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structpio__hw__t.html">PIO</a>&#160;</td>
          <td class="paramname"><em>pio</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>sm</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>div</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>set the current clock divider for a state machine </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pio</td><td>The PIO instance; e.g. <a class="el" href="group__hardware__pio.html#ga916d05e71da7f2173cd22b46bbfa0a11">pio0</a> or <a class="el" href="group__hardware__pio.html#ga923a261ba19804c404900228e99c9522">pio1</a> </td></tr>
    <tr><td class="paramname">sm</td><td>State machine index (0..3) </td></tr>
    <tr><td class="paramname">div</td><td>the floating point clock divider </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="gaa9d1d18a7decd0068b8a2a9159c9fd34" name="gaa9d1d18a7decd0068b8a2a9159c9fd34"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaa9d1d18a7decd0068b8a2a9159c9fd34">&#9670;&nbsp;</a></span>pio_sm_set_clkdiv_int_frac()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void pio_sm_set_clkdiv_int_frac </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structpio__hw__t.html">PIO</a>&#160;</td>
          <td class="paramname"><em>pio</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>sm</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>div_int</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>div_frac</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>set the current clock divider for a state machine using a 16:8 fraction </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pio</td><td>The PIO instance; e.g. <a class="el" href="group__hardware__pio.html#ga916d05e71da7f2173cd22b46bbfa0a11">pio0</a> or <a class="el" href="group__hardware__pio.html#ga923a261ba19804c404900228e99c9522">pio1</a> </td></tr>
    <tr><td class="paramname">sm</td><td>State machine index (0..3) </td></tr>
    <tr><td class="paramname">div_int</td><td>the integer part of the clock divider </td></tr>
    <tr><td class="paramname">div_frac</td><td>the fractional part of the clock divider in 1/256s </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga28e9a84f3332ebf088f665d4b676117b" name="ga28e9a84f3332ebf088f665d4b676117b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga28e9a84f3332ebf088f665d4b676117b">&#9670;&nbsp;</a></span>pio_sm_set_config()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static int pio_sm_set_config </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structpio__hw__t.html">PIO</a>&#160;</td>
          <td class="paramname"><em>pio</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>sm</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structpio__sm__config.html">pio_sm_config</a> *&#160;</td>
          <td class="paramname"><em>config</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Apply a state machine configuration to a state machine. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pio</td><td>Handle to PIO instance; e.g. <a class="el" href="group__hardware__pio.html#ga916d05e71da7f2173cd22b46bbfa0a11">pio0</a> or <a class="el" href="group__hardware__pio.html#ga923a261ba19804c404900228e99c9522">pio1</a> </td></tr>
    <tr><td class="paramname">sm</td><td>State machine index (0..3) </td></tr>
    <tr><td class="paramname">config</td><td>the configuration to apply </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>PICO_OK (0) on success, negative error code otherwise </dd></dl>

</div>
</div>
<a id="gaf5c965ef1ca21684630c8be2cf3e52e7" name="gaf5c965ef1ca21684630c8be2cf3e52e7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaf5c965ef1ca21684630c8be2cf3e52e7">&#9670;&nbsp;</a></span>pio_sm_set_consecutive_pindirs()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int pio_sm_set_consecutive_pindirs </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structpio__hw__t.html">PIO</a>&#160;</td>
          <td class="paramname"><em>pio</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>sm</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>pins_base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>pin_count</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>is_out</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Use a state machine to set the same pin direction for multiple consecutive pins for the PIO instance. </p>
<p >This method repeatedly reconfigures the target state machine's pin configuration and executes 'set' instructions to set the pin direction on consecutive pins, before restoring the state machine's pin configuration to what it was.</p>
<p >This method is provided as a convenience to set initial pin directions, and should not be used against a state machine that is enabled.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pio</td><td>The PIO instance; e.g. <a class="el" href="group__hardware__pio.html#ga916d05e71da7f2173cd22b46bbfa0a11">pio0</a> or <a class="el" href="group__hardware__pio.html#ga923a261ba19804c404900228e99c9522">pio1</a> </td></tr>
    <tr><td class="paramname">sm</td><td>State machine index (0..3) to use </td></tr>
    <tr><td class="paramname">pins_base</td><td>the first pin to set a direction for </td></tr>
    <tr><td class="paramname">pin_count</td><td>the count of consecutive pins to set the direction for </td></tr>
    <tr><td class="paramname">is_out</td><td>the direction to set; true = out, false = in </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>PICO_OK (0) on success, error code otherwise </dd></dl>

</div>
</div>
<a id="gaa47ec4090dcdc251e44bf4e4cb89a7bc" name="gaa47ec4090dcdc251e44bf4e4cb89a7bc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaa47ec4090dcdc251e44bf4e4cb89a7bc">&#9670;&nbsp;</a></span>pio_sm_set_enabled()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void pio_sm_set_enabled </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structpio__hw__t.html">PIO</a>&#160;</td>
          <td class="paramname"><em>pio</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>sm</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>enabled</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Enable or disable a PIO state machine. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pio</td><td>The PIO instance; e.g. <a class="el" href="group__hardware__pio.html#ga916d05e71da7f2173cd22b46bbfa0a11">pio0</a> or <a class="el" href="group__hardware__pio.html#ga923a261ba19804c404900228e99c9522">pio1</a> </td></tr>
    <tr><td class="paramname">sm</td><td>State machine index (0..3) </td></tr>
    <tr><td class="paramname">enabled</td><td>true to enable the state machine; false to disable </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="gaef50ef92f7ea0666dffe939c0b3fd24c" name="gaef50ef92f7ea0666dffe939c0b3fd24c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaef50ef92f7ea0666dffe939c0b3fd24c">&#9670;&nbsp;</a></span>pio_sm_set_in_pins()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void pio_sm_set_in_pins </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structpio__hw__t.html">PIO</a>&#160;</td>
          <td class="paramname"><em>pio</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>sm</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>in_base</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Set the current 'in' pins for a state machine. </p>
<p >'in' pins can overlap with the 'out', 'set' and 'sideset' pins</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pio</td><td>The PIO instance; e.g. <a class="el" href="group__hardware__pio.html#ga916d05e71da7f2173cd22b46bbfa0a11">pio0</a> or <a class="el" href="group__hardware__pio.html#ga923a261ba19804c404900228e99c9522">pio1</a> </td></tr>
    <tr><td class="paramname">sm</td><td>State machine index (0..3) </td></tr>
    <tr><td class="paramname">in_base</td><td>0-31 First pin to use as input </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga97b135c9016b91fbf237c93313d25fd4" name="ga97b135c9016b91fbf237c93313d25fd4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga97b135c9016b91fbf237c93313d25fd4">&#9670;&nbsp;</a></span>pio_sm_set_jmp_pin()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void pio_sm_set_jmp_pin </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structpio__hw__t.html">PIO</a>&#160;</td>
          <td class="paramname"><em>pio</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>sm</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>pin</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Set the 'jmp' pin for a state machine. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pio</td><td>The PIO instance; e.g. <a class="el" href="group__hardware__pio.html#ga916d05e71da7f2173cd22b46bbfa0a11">pio0</a> or <a class="el" href="group__hardware__pio.html#ga923a261ba19804c404900228e99c9522">pio1</a> </td></tr>
    <tr><td class="paramname">sm</td><td>State machine index (0..3) </td></tr>
    <tr><td class="paramname">pin</td><td>The raw GPIO pin number to use as the source for a <code>jmp pin</code> instruction </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga7f0190e662c5b6e24d91044b42010ffc" name="ga7f0190e662c5b6e24d91044b42010ffc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga7f0190e662c5b6e24d91044b42010ffc">&#9670;&nbsp;</a></span>pio_sm_set_out_pins()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void pio_sm_set_out_pins </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structpio__hw__t.html">PIO</a>&#160;</td>
          <td class="paramname"><em>pio</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>sm</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>out_base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>out_count</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Set the current 'out' pins for a state machine. </p>
<p >'out' pins can overlap with the 'in', 'set' and 'sideset' pins</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pio</td><td>The PIO instance; e.g. <a class="el" href="group__hardware__pio.html#ga916d05e71da7f2173cd22b46bbfa0a11">pio0</a> or <a class="el" href="group__hardware__pio.html#ga923a261ba19804c404900228e99c9522">pio1</a> </td></tr>
    <tr><td class="paramname">sm</td><td>State machine index (0..3) </td></tr>
    <tr><td class="paramname">out_base</td><td>0-31 First pin to set as output </td></tr>
    <tr><td class="paramname">out_count</td><td>0-32 Number of pins to set. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga8269f1ef4cb1e4b3b957d5f1fa6fc623" name="ga8269f1ef4cb1e4b3b957d5f1fa6fc623"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga8269f1ef4cb1e4b3b957d5f1fa6fc623">&#9670;&nbsp;</a></span>pio_sm_set_pindirs_with_mask()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void pio_sm_set_pindirs_with_mask </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structpio__hw__t.html">PIO</a>&#160;</td>
          <td class="paramname"><em>pio</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>sm</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>pin_dirs</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>pin_mask</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Use a state machine to set the pin directions for multiple pins for the PIO instance. </p>
<p >This method repeatedly reconfigures the target state machine's pin configuration and executes 'set' instructions to set pin directions on up to 32 pins, before restoring the state machine's pin configuration to what it was.</p>
<p >This method is provided as a convenience to set initial pin directions, and should not be used against a state machine that is enabled.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pio</td><td>The PIO instance; e.g. <a class="el" href="group__hardware__pio.html#ga916d05e71da7f2173cd22b46bbfa0a11">pio0</a> or <a class="el" href="group__hardware__pio.html#ga923a261ba19804c404900228e99c9522">pio1</a> </td></tr>
    <tr><td class="paramname">sm</td><td>State machine index (0..3) to use </td></tr>
    <tr><td class="paramname">pin_dirs</td><td>the pin directions to set - 1 = out, 0 = in (if the corresponding bit in pin_mask is set) </td></tr>
    <tr><td class="paramname">pin_mask</td><td>a bit for each pin to indicate whether the corresponding pin_value for that pin should be applied. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga1286f306263b413a8002c9db2b433d8b" name="ga1286f306263b413a8002c9db2b433d8b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga1286f306263b413a8002c9db2b433d8b">&#9670;&nbsp;</a></span>pio_sm_set_pins()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void pio_sm_set_pins </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structpio__hw__t.html">PIO</a>&#160;</td>
          <td class="paramname"><em>pio</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>sm</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>pin_values</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Use a state machine to set a value on all pins for the PIO instance. </p>
<p >This method repeatedly reconfigures the target state machine's pin configuration and executes 'set' instructions to set values on all 32 pins, before restoring the state machine's pin configuration to what it was.</p>
<p >This method is provided as a convenience to set initial pin states, and should not be used against a state machine that is enabled.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pio</td><td>The PIO instance; e.g. <a class="el" href="group__hardware__pio.html#ga916d05e71da7f2173cd22b46bbfa0a11">pio0</a> or <a class="el" href="group__hardware__pio.html#ga923a261ba19804c404900228e99c9522">pio1</a> </td></tr>
    <tr><td class="paramname">sm</td><td>State machine index (0..3) to use </td></tr>
    <tr><td class="paramname">pin_values</td><td>the pin values to set </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga963167ca42f67f79ec5de6b47d6027d5" name="ga963167ca42f67f79ec5de6b47d6027d5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga963167ca42f67f79ec5de6b47d6027d5">&#9670;&nbsp;</a></span>pio_sm_set_pins_with_mask()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void pio_sm_set_pins_with_mask </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structpio__hw__t.html">PIO</a>&#160;</td>
          <td class="paramname"><em>pio</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>sm</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>pin_values</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>pin_mask</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Use a state machine to set a value on multiple pins for the PIO instance. </p>
<p >This method repeatedly reconfigures the target state machine's pin configuration and executes 'set' instructions to set values on up to 32 pins, before restoring the state machine's pin configuration to what it was.</p>
<p >This method is provided as a convenience to set initial pin states, and should not be used against a state machine that is enabled.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pio</td><td>The PIO instance; e.g. <a class="el" href="group__hardware__pio.html#ga916d05e71da7f2173cd22b46bbfa0a11">pio0</a> or <a class="el" href="group__hardware__pio.html#ga923a261ba19804c404900228e99c9522">pio1</a> </td></tr>
    <tr><td class="paramname">sm</td><td>State machine index (0..3) to use </td></tr>
    <tr><td class="paramname">pin_values</td><td>the pin values to set (if the corresponding bit in pin_mask is set) </td></tr>
    <tr><td class="paramname">pin_mask</td><td>a bit for each pin to indicate whether the corresponding pin_value for that pin should be applied. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="gacaf6ee284dc834fbb742d1eef6180e6c" name="gacaf6ee284dc834fbb742d1eef6180e6c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gacaf6ee284dc834fbb742d1eef6180e6c">&#9670;&nbsp;</a></span>pio_sm_set_set_pins()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void pio_sm_set_set_pins </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structpio__hw__t.html">PIO</a>&#160;</td>
          <td class="paramname"><em>pio</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>sm</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>set_base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>set_count</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Set the current 'set' pins for a state machine. </p>
<p >'set' pins can overlap with the 'in', 'out' and 'sideset' pins</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pio</td><td>The PIO instance; e.g. <a class="el" href="group__hardware__pio.html#ga916d05e71da7f2173cd22b46bbfa0a11">pio0</a> or <a class="el" href="group__hardware__pio.html#ga923a261ba19804c404900228e99c9522">pio1</a> </td></tr>
    <tr><td class="paramname">sm</td><td>State machine index (0..3) </td></tr>
    <tr><td class="paramname">set_base</td><td>0-31 First pin to set as </td></tr>
    <tr><td class="paramname">set_count</td><td>0-5 Number of pins to set. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga87cb36afe5783e2e92bf528b1d50ea07" name="ga87cb36afe5783e2e92bf528b1d50ea07"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga87cb36afe5783e2e92bf528b1d50ea07">&#9670;&nbsp;</a></span>pio_sm_set_sideset_pins()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void pio_sm_set_sideset_pins </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structpio__hw__t.html">PIO</a>&#160;</td>
          <td class="paramname"><em>pio</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>sm</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>sideset_base</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Set the current 'sideset' pins for a state machine. </p>
<p >'sideset' pins can overlap with the 'in', 'out' and 'set' pins</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pio</td><td>The PIO instance; e.g. <a class="el" href="group__hardware__pio.html#ga916d05e71da7f2173cd22b46bbfa0a11">pio0</a> or <a class="el" href="group__hardware__pio.html#ga923a261ba19804c404900228e99c9522">pio1</a> </td></tr>
    <tr><td class="paramname">sm</td><td>State machine index (0..3) </td></tr>
    <tr><td class="paramname">sideset_base</td><td>0-31 base pin for 'side set' </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga74a681208957ab2bc8c8aafff9bb9f7c" name="ga74a681208957ab2bc8c8aafff9bb9f7c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga74a681208957ab2bc8c8aafff9bb9f7c">&#9670;&nbsp;</a></span>pio_sm_set_wrap()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void pio_sm_set_wrap </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structpio__hw__t.html">PIO</a>&#160;</td>
          <td class="paramname"><em>pio</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>sm</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>wrap_target</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>wrap</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Set the current wrap configuration for a state machine. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pio</td><td>The PIO instance; e.g. <a class="el" href="group__hardware__pio.html#ga916d05e71da7f2173cd22b46bbfa0a11">pio0</a> or <a class="el" href="group__hardware__pio.html#ga923a261ba19804c404900228e99c9522">pio1</a> </td></tr>
    <tr><td class="paramname">sm</td><td>State machine index (0..3) </td></tr>
    <tr><td class="paramname">wrap_target</td><td>the instruction memory address to wrap to </td></tr>
    <tr><td class="paramname">wrap</td><td>the instruction memory address after which to set the program counter to wrap_target if the instruction does not itself update the program_counter </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga62328112de918932e4ed0955ce0054ab" name="ga62328112de918932e4ed0955ce0054ab"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga62328112de918932e4ed0955ce0054ab">&#9670;&nbsp;</a></span>pio_sm_unclaim()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void pio_sm_unclaim </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structpio__hw__t.html">PIO</a>&#160;</td>
          <td class="paramname"><em>pio</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>sm</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Mark a state machine as no longer used. </p>
<p >Method for cooperative claiming of hardware.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pio</td><td>The PIO instance; e.g. <a class="el" href="group__hardware__pio.html#ga916d05e71da7f2173cd22b46bbfa0a11">pio0</a> or <a class="el" href="group__hardware__pio.html#ga923a261ba19804c404900228e99c9522">pio1</a> </td></tr>
    <tr><td class="paramname">sm</td><td>State machine index (0..3) </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->

	<script src="main.js"></script>
</body>
</html>